hrm_ui_lib 2.5.6 → 2.5.7
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.
|
@@ -26,6 +26,7 @@ export const TimePickerDesktop = (props) => {
|
|
|
26
26
|
const calendarRef = useRef(null);
|
|
27
27
|
useImportFilesDynamically(locale);
|
|
28
28
|
const onChange = (date) => {
|
|
29
|
+
setTime(date ? dayjs(date).format('HH:mm') : '');
|
|
29
30
|
if (changeHandler) {
|
|
30
31
|
changeHandler(date);
|
|
31
32
|
}
|
|
@@ -43,11 +44,7 @@ export const TimePickerDesktop = (props) => {
|
|
|
43
44
|
const formatAndSetTime = () => {
|
|
44
45
|
const _date = new Date();
|
|
45
46
|
_date.setHours(0, 0);
|
|
46
|
-
if (!time) {
|
|
47
|
-
onChange(_date);
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
if (time.includes(':') && time[2] !== ':') {
|
|
47
|
+
if (!time || (time.includes(':') && time[2] !== ':')) {
|
|
51
48
|
onChange(_date);
|
|
52
49
|
return;
|
|
53
50
|
}
|