Skip to content

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

@kimmyphua

Description

@kimmyphua

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions