DatePicker double digit year

2 posts, 0 answers
  1. Matej
    Matej avatar
    69 posts
    Member since:
    Jun 2019

    Posted 11 Mar 2020 Link to this post

    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.

  2. Stefan
    Admin
    Stefan avatar
    3008 posts

    Posted 12 Mar 2020 Link to this post

    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
Back to Top