This is a migrated thread and some comments may be shown as answers.

DateInput cannot handle the dd-MM-yy format

3 Answers 72 Views
DateInput
This is a migrated thread and some comments may be shown as answers.
Roland
Top achievements
Rank 3
Iron
Iron
Veteran
Roland asked on 31 Aug 2020, 05:46 PM

Every time you try to edit the year part, strange things happen.

"20" is not accepted as 2020, "60" not as 1960. Typing in a full year like 2020 is also not accepted.

Is this a bug, or am I doing something wrong?

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 31 Aug 2020, 07:19 PM

Hello Roland,

Does the online demo work fine for you, as it does for me: https://demos.telerik.com/blazor-ui/dateinput/overview? I can enter both 1960 and 2020.

In case you are trying to input a two-digit format - I'd advise against that as it produces heuristic issues that I just described in this new section: https://docs.telerik.com/blazor-ui/components/dateinput/supported-formats#two-digit-year-formats.

Regards,
Marin Bratanov
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

0
Roland
Top achievements
Rank 3
Iron
Iron
Veteran
answered on 31 Aug 2020, 08:36 PM

I am using a 4-digit format as workaround, but 2-digit formats are quite normal over here. That is why most tools and OS-es have cutoff years. Often a floating cutoff year that is 50 years before the current date. So anything below 70 would be 20xx. Or you can have a cutoff year close to a century ago, because you consider dates past more relevant than future dates. 

.NET has System.Globalization.TwoDigitYearMax.

0
Accepted
Marin Bratanov
Telerik team
answered on 01 Sep 2020, 01:59 PM

Hello Roland,

I made this feature request page on your behalf where you can Follow the implementation of such a feature: https://feedback.telerik.com/blazor/1482911-cutoff-year-to-allow-two-digit-year-formats.

 

Regards,
Marin Bratanov
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

Tags
DateInput
Asked by
Roland
Top achievements
Rank 3
Iron
Iron
Veteran
Answers by
Marin Bratanov
Telerik team
Roland
Top achievements
Rank 3
Iron
Iron
Veteran
Share this question
or