@momo-kits/date-picker 0.92.7 → 0.92.8
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/index.tsx +9 -8
- package/package.json +1 -1
package/index.tsx
CHANGED
|
@@ -102,16 +102,17 @@ const DateTimePicker: FC<DateTimePickerProps> = ({
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
newDate.min,
|
|
112
|
-
),
|
|
105
|
+
const changedDate = new Date(
|
|
106
|
+
newDate.year,
|
|
107
|
+
newDate.month - 1,
|
|
108
|
+
newDate.day,
|
|
109
|
+
newDate.hour,
|
|
110
|
+
newDate.min,
|
|
113
111
|
);
|
|
114
112
|
|
|
113
|
+
if (changedDate <= maxDate && changedDate >= minDate) {
|
|
114
|
+
onChange?.(changedDate);
|
|
115
|
+
}
|
|
115
116
|
setCurrentDate(newDate);
|
|
116
117
|
};
|
|
117
118
|
|