You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Date components does not wait till user leaves field to correct users data.
As soon as you start typing the year, it corrects the day - But it does not take into context if the year you type is a leap year or not
To Reproduce
Start typing 29-02
Then when you start typing 2-0-2-4 in year field - As soon as you type 2 it corrects it to 28-02.
This is an expected behavior of the DatePicker component as it is autocorrecting the invalid date parts. In the described case, as soon as '2' is typed for the year part, the year becomes '0002' which is a valid year. However, because it is not a leap year, it autocorrects the day part. If the year is changed first, e.g. to 2024, then typing 29-02 will not be autocorrected.
Describe the bug
Date components does not wait till user leaves field to correct users data.
As soon as you start typing the year, it corrects the day - But it does not take into context if the year you type is a leap year or not
To Reproduce
Can be tested here: https://stackblitz.com/edit/angular-161vu1?file=src%2Fapp%2Fapp.component.ts
Expected behavior
Since leap years exist it should probably first correct the date on input blur as to not make presumptions of input value is wrong.
The text was updated successfully, but these errors were encountered: