Telerik RadDatePicker does not collect dates of 2030

I am using the RadDatePicker control to input the start and end dates of a date in my form.
I accept "01/01/1980" as the minimum date and "12/31/2049" as the maximum date. I encountered a problem manually entering a date in the Date field.

Scenario 1: I entered the date as 123129. RadPicker selects it correctly as 12/31/2029 and displays the formatted date value.
Scenario 2: I enter the date as 123130. I get a warning about client-side validation. No matter what day and month I enter, it freezes every time a year more than XX / XX / 29 (2029).
Scenario 3: I enter the date as 12312030 - full year instead of the last two digits. RadPicker correctly selects it as 12/31/2030 and displays a formatted date value.

I tested all 3 scripts on ASP.NET Calendar Demo - DatePicker - First Look .

I am not sure why the check is done even when the maximum date is set to 12/31/2049.
Please help me in solving this problem.

Thanks,
Vaibhav

+4
source share
1 answer

"Years beginning with 30 and above are parsed as 19 .. as if you said 30th (year), it will turn out as 1930, 123130 will be parsed as 12/31/1930. This is not true, since the default value from MinDate, ie 1/1/1980. To solve this problem, set the ShortYearCenturyEnd property of the DateInput parameter to 2099.

I hope I answered the question.

+1
source

Source: https://habr.com/ru/post/1493109/


All Articles