react-datepicker icon indicating copy to clipboard operation
react-datepicker copied to clipboard

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

Open kimmyphua opened this issue 8 months ago • 0 comments

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

https://github.com/user-attachments/assets/fca0e05d-060f-40e3-a9a7-4d356157d3e0

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

https://github.com/user-attachments/assets/9264a15c-4833-4e51-aea4-8d4aac66c68d

kimmyphua avatar Apr 15 '25 07:04 kimmyphua