react-better-html 1.1.230 → 1.1.231
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5034,7 +5034,9 @@ InputFieldComponent.time = (0, import_react21.forwardRef)(function Time({ hoursT
|
|
|
5034
5034
|
const minutes2 = parseInt(value.split(":")[1] || "0");
|
|
5035
5035
|
const readyHour = readyHours.includes(hours2) ? hours2 : findClosestNumber(readyHours, hours2);
|
|
5036
5036
|
const readyMinute = readyMinutes.includes(minutes2) ? minutes2 : findClosestNumber(readyMinutes, minutes2);
|
|
5037
|
-
const
|
|
5037
|
+
const finalHour = minHours && readyHour < minHours ? minHours : maxHours && readyHour > maxHours ? maxHours : readyHour;
|
|
5038
|
+
const finalMinute = minHours !== void 0 && minMinutes !== void 0 && finalHour === minHours && readyMinute < minMinutes ? minMinutes : maxHours !== void 0 && maxMinutes !== void 0 && finalHour === maxHours && readyMinute > maxMinutes ? maxMinutes : readyMinute;
|
|
5039
|
+
const newValue = `${finalHour.toString().padStart(2, "0")}:${finalMinute.toString().padStart(2, "0")}`;
|
|
5038
5040
|
inputFieldProps.onChangeValue?.(newValue);
|
|
5039
5041
|
}
|
|
5040
5042
|
inputFieldProps.onBlur?.(event);
|
|
@@ -5138,7 +5140,8 @@ InputFieldComponent.time = (0, import_react21.forwardRef)(function Time({ hoursT
|
|
|
5138
5140
|
tabIndex: -1,
|
|
5139
5141
|
children: readyMinutes.map((minute) => {
|
|
5140
5142
|
const isSelected = minute.toString() === valueMinute;
|
|
5141
|
-
const
|
|
5143
|
+
const currentHour = parseInt(valueHour);
|
|
5144
|
+
const isDisabled = minHours !== void 0 && minMinutes !== void 0 && currentHour === minHours && minute < minMinutes || maxHours !== void 0 && maxMinutes !== void 0 && currentHour === maxHours && minute > maxMinutes;
|
|
5142
5145
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5143
5146
|
Div_default.row,
|
|
5144
5147
|
{
|