Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DateInputs] Invalid automatic correction for leap year #4416

Closed
mbechev opened this issue Sep 26, 2024 · 1 comment
Closed

[DateInputs] Invalid automatic correction for leap year #4416

mbechev opened this issue Sep 26, 2024 · 1 comment

Comments

@mbechev
Copy link
Contributor

mbechev commented Sep 26, 2024

Description

Using the date format MM/dd/yyyy and typing 02/29/2, immediately changes the day from 29 to 28 not waiting for the year to be fully inserted. This happens when autoCorrectParts is set to true. If the property is set to false the day and month numbers are preserved, but you can't insert the year index anymore. Trying to insert 02/29/2024 results in 02/29/0004.

Related to #2008

Steps To Reproduce

  1. Type 02/29/2
  2. The date is changed to 28.
    https://stackblitz.com/edit/angular-ftyhrg

Screenshots or video

Incorrect automatic change 29->28 after inserting the first digit for the year:

Screen.Recording.2024-09-26.at.11.21.16.mov

Actual Behavior

The day number is changed before the year is fully inserted.

Expected Behavior

The day number (29) must not be changed until the year is fully typed.

Browser

All

Browser version

latest

OS type

No response

OS version

No response

Last working version of the Kendo UI for Angular package (if regression).

No response

@svetq
Copy link
Contributor

svetq commented Oct 2, 2024

When using autoCorrectParts="true" and typing in 2/29/2 it is expected that the day is changed to 28 as 2 is a valid non leap year.

When using autoCorrectParts="false" and typing in 2/29/2 it is not possible to change the year part. That is a bug on our side indeed. I am closing this issue in favor of #4399

@svetq svetq closed this as completed Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants