DatePicker Min and Max value permit date out of range

0 Answers 8 Views
DatePicker Validation
FranckSix
Top achievements
Rank 2
Iron
Iron
Iron
FranckSix asked on 26 Sep 2025, 01:28 PM
When I use the DatePicker, the calendar displays a date between the minimum and maximum values, which is fine. However, if I manually enter a date before the minimum or after the maximum value, nothing prevents me from doing so. Even worse, the change event is no longer triggered. There's no way to validate the input manually if it's out of range.

Wouldn't it have been better for the control to block manually entered values ​​that exceed the allowed range?
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
commented on 26 Sep 2025, 03:21 PM | edited

If I manually enter a date outside the range, it changes the displayed date to the closest date in the range, as you can see in this dojo. If you run the dojo and manually enter a date outside the range, the displayed date changes and no change event fires. 

However, if you enter a valid value and then manually change it to an invalid value, once again the displayed date changes to the closest date in the range, but the change event does fire with a null value. 

My assumption would be, then, that in the first case, the value was null and after you enter an invalid date, it remains null so no change occurred, even though a date is displayed.

Admittedly, you can get the behavior you describe if you set autoAdjust to false, though even then, if you change a valid date to an invalid date, the change event does still fire with a null value.

FranckSix
Top achievements
Rank 2
Iron
Iron
Iron
commented on 26 Sep 2025, 04:10 PM | edited

It seem the magic operate only if the option dateInput is set to true

Just notice that the change event is called only for the wrong value. The change by Kendo control to minimal value not trigger change event.

No answers yet. Maybe you can help?

Tags
DatePicker Validation
Asked by
FranckSix
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or