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

DatePicker double digit year

1 Answer 193 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Matej
Top achievements
Rank 1
Veteran
Matej asked on 11 Mar 2020, 01:11 PM

Hi, 

I have a date picker with a format "dd/MM/yy" https://stackblitz.com/edit/react-igyygx . Is there a way how to force the DatePicker to stay in this century? Because now when I replace the year with a 12 the result is 2012 but 44 will jump to 1944.

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 12 Mar 2020, 10:23 AM

Hello, Matej,

Thank you for your example.

We will research if we can restrict this internally without any drawbacks.

Until then, I can suggest parsing the date on the onChange event to ensure that the first portion of the year is still the same:

https://stackblitz.com/edit/react-6yy9v7?file=app/main.jsx

I hope this is helpful.

Regards,
Stefan
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Matej
Top achievements
Rank 1
Veteran
Answers by
Stefan
Telerik team
Share this question
or