Skip to content

date value not reflecting correctly onBlur after clearing input and manually typing in new value #5571

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

Open
kimmyphua opened this issue Apr 15, 2025 · 0 comments

Comments

@kimmyphua
Copy link

Describe the bug
When I clear the date input using the clear icon (isClearable) and manually enter a new value,
the new value that has been manually typed in is not formatted correctly upon clicking outside (onBlur).

as shown in the video, after clicking the clear icon and typing in an invalid date, the input should have been cleared (which works if i click inside the input before typing)

Screenshots
https://reactdatepicker.com/#example-clear-datepicker-input

Screen.Recording.2025-04-15.at.3.01.40.PM.mov

To Reproduce
Steps to reproduce the behavior: can be seen in demo site

  1. Go to https://reactdatepicker.com/#example-clear-datepicker-input
  2. Enter a valid date
  3. Clear using the clear icon
  4. Directly type in any value

Expected behavior
Should format/validate onBlur

OnBlur is not the issue. as shown in this video (isClearable + onBlur callback), it is triggering onBlur but the input is not reflecting

Screen.Recording.2025-04-15.at.3.12.58.PM.mov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant