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
I encountered a bug when using React Datepicker v7.5.0 with the dateFormat set to yyyy-MM-dd. The expected behavior is that when the user manually types a year, month, or date, the calendar should instantly update based on the input. However, this only works with the yyyy/MM/dd format and fails when using yyyy-MM-dd.
Steps to Reproduce:
Install and use React Datepicker v7.5.0.
Set the dateFormat to yyyy-MM-dd.
Start typing the date manually in the input box. For example:
Type: 2008 → The calendar should instantly reflect January 2008.
Type: 2008-09 → The calendar should instantly reflect September 2008.
Type: 2008-09-09 → The calendar should instantly reflect 9th September 2008.
Behavior: The calendar does not update according to the input unless the format is changed to yyyy/MM/dd.
Expected Behavior:
The calendar should reflect the input as you type:
Typing 2008 → Calendar should show January 2008.
Typing 2008-09 → Calendar should show September 2008.
Typing 2008-09-09 → Calendar should show 9th September 2008.
This behavior works perfectly fine when using yyyy/MM/dd but fails with yyyy-MM-dd.
Actual Behavior:
When using yyyy-MM-dd format, the calendar does not instantly update while typing.
However, when using yyyy/MM/dd format, the calendar updates correctly as you type.
Desktop:
React Datepicker Version: v7.5.0
React Version: 18.2.0
OS: windows
Browser : chrome
Version 133.0.6943.142
Additional Notes:
This behavior seems like a bug in the internal date parser when using the yyyy-MM-dd format.
It is critical for the input field to update the calendar instantly as users type the date.
I am providing a link to the CodeSandbox to reproduce the issue.
Could you please confirm if this is a bug or expected behavior? If it’s a bug, it would be helpful to have it fixed in upcoming versions as yyyy-MM-dd is widely used in many applications.
Thank you for your time and consideration! 😊
The text was updated successfully, but these errors were encountered:
Describe the bug
I encountered a bug when using React Datepicker v7.5.0 with the dateFormat set to yyyy-MM-dd. The expected behavior is that when the user manually types a year, month, or date, the calendar should instantly update based on the input. However, this only works with the yyyy/MM/dd format and fails when using yyyy-MM-dd.
Steps to Reproduce:
Install and use React Datepicker v7.5.0.
Set the dateFormat to yyyy-MM-dd.
Start typing the date manually in the input box. For example:
Behavior: The calendar does not update according to the input unless the format is changed to yyyy/MM/dd.
Expected Behavior:
The calendar should reflect the input as you type:
This behavior works perfectly fine when using yyyy/MM/dd but fails with yyyy-MM-dd.
Actual Behavior:
When using yyyy-MM-dd format, the calendar does not instantly update while typing.
However, when using yyyy/MM/dd format, the calendar updates correctly as you type.
Desktop:
Additional Notes:
This behavior seems like a bug in the internal date parser when using the yyyy-MM-dd format.
It is critical for the input field to update the calendar instantly as users type the date.
I am providing a link to the CodeSandbox to reproduce the issue.
https://2t4l85.csb.app/
https://codesandbox.io/p/sandbox/2t4l85
Could you please confirm if this is a bug or expected behavior? If it’s a bug, it would be helpful to have it fixed in upcoming versions as yyyy-MM-dd is widely used in many applications.
Thank you for your time and consideration! 😊
The text was updated successfully, but these errors were encountered: