react-datepicker
react-datepicker copied to clipboard
injectTimes items reset the selected date to today.
Describe the bug
Hello, it seem that selecting a time value passed to the component using injectTimes
property reset the current selected date to today.
To Reproduce Steps to reproduce the behavior:
Can be reproduce in the demo example of injectTimes
property (https://reactdatepicker.com/#example-inject-specific-times).
- Go to https://reactdatepicker.com/#example-inject-specific-times
- Select a date and an "default time", e.g. 30 Jan 2024 22h30.
- Reopen the datepicker and select an "injectedTimes", e.g. 23h59
- See the error, the date is set back to the date of today.
Expected behavior
The date should not be updated to today when you click on an injectedTimes
, like the default time.
Screenshots
Desktop (please complete the following information):
- OS: Linux Mint 20.3 Una
- Browser Firefox, Chromium
- Version 122.0.1, 122.0.6261.29