@ikatec/nebula-react 1.0.22 → 1.0.23
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 +15 -5
- package/dist/index.mjs +15 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4243,9 +4243,21 @@ var InputDateTimePickerSingle = ({
|
|
|
4243
4243
|
return;
|
|
4244
4244
|
}
|
|
4245
4245
|
const [hour, minutes] = hourSlice.split(":");
|
|
4246
|
+
const padStart = (str, shouldPad = false) => {
|
|
4247
|
+
if (shouldPad) {
|
|
4248
|
+
return str.padStart(2, "0");
|
|
4249
|
+
}
|
|
4250
|
+
return str;
|
|
4251
|
+
};
|
|
4246
4252
|
const normalizedTime = [
|
|
4247
|
-
hour ?
|
|
4248
|
-
|
|
4253
|
+
hour ? padStart(
|
|
4254
|
+
Math.min(Math.max(+hour, 0), 23).toString(),
|
|
4255
|
+
hour.length === 2
|
|
4256
|
+
) : "",
|
|
4257
|
+
minutes ? padStart(
|
|
4258
|
+
Math.min(Math.max(+minutes, 0), 59).toString(),
|
|
4259
|
+
minutes.length === 2
|
|
4260
|
+
) : ""
|
|
4249
4261
|
].filter(Boolean).join(":");
|
|
4250
4262
|
setInnerTimeValue(normalizedTime);
|
|
4251
4263
|
const [dateStr] = text.split(DATA_TIME_SEPARATOR);
|
|
@@ -4298,9 +4310,7 @@ var InputDateTimePickerSingle = ({
|
|
|
4298
4310
|
date,
|
|
4299
4311
|
innerTimeValue
|
|
4300
4312
|
);
|
|
4301
|
-
|
|
4302
|
-
setTimeout(() => inputTimeRef.current?.focus(), 100);
|
|
4303
|
-
}
|
|
4313
|
+
setTimeout(() => inputTimeRef.current?.focus(), 100);
|
|
4304
4314
|
};
|
|
4305
4315
|
const normalizedCalendarDate = React8.useMemo(() => {
|
|
4306
4316
|
return dateFns.isValid(innerDate) ? innerDate : void 0;
|
package/dist/index.mjs
CHANGED
|
@@ -4203,9 +4203,21 @@ var InputDateTimePickerSingle = ({
|
|
|
4203
4203
|
return;
|
|
4204
4204
|
}
|
|
4205
4205
|
const [hour, minutes] = hourSlice.split(":");
|
|
4206
|
+
const padStart = (str, shouldPad = false) => {
|
|
4207
|
+
if (shouldPad) {
|
|
4208
|
+
return str.padStart(2, "0");
|
|
4209
|
+
}
|
|
4210
|
+
return str;
|
|
4211
|
+
};
|
|
4206
4212
|
const normalizedTime = [
|
|
4207
|
-
hour ?
|
|
4208
|
-
|
|
4213
|
+
hour ? padStart(
|
|
4214
|
+
Math.min(Math.max(+hour, 0), 23).toString(),
|
|
4215
|
+
hour.length === 2
|
|
4216
|
+
) : "",
|
|
4217
|
+
minutes ? padStart(
|
|
4218
|
+
Math.min(Math.max(+minutes, 0), 59).toString(),
|
|
4219
|
+
minutes.length === 2
|
|
4220
|
+
) : ""
|
|
4209
4221
|
].filter(Boolean).join(":");
|
|
4210
4222
|
setInnerTimeValue(normalizedTime);
|
|
4211
4223
|
const [dateStr] = text.split(DATA_TIME_SEPARATOR);
|
|
@@ -4258,9 +4270,7 @@ var InputDateTimePickerSingle = ({
|
|
|
4258
4270
|
date,
|
|
4259
4271
|
innerTimeValue
|
|
4260
4272
|
);
|
|
4261
|
-
|
|
4262
|
-
setTimeout(() => inputTimeRef.current?.focus(), 100);
|
|
4263
|
-
}
|
|
4273
|
+
setTimeout(() => inputTimeRef.current?.focus(), 100);
|
|
4264
4274
|
};
|
|
4265
4275
|
const normalizedCalendarDate = useMemo(() => {
|
|
4266
4276
|
return isValid(innerDate) ? innerDate : void 0;
|