keyboard-selected is applied incorrectly.
Describe the bug
The class .react-datepicker__day--keyboard-selected is applied to a selected day, regardless of month. This makes it so that all days gets the class .react-datepicker__day--in-selecting-range.
To Reproduce Steps to reproduce the behavior:
- Go to Datepicker examples
- Find the first or any Date Range example
- Select a range of say a week in the current month.
- Go back or forward one or several months
Expected behavior
Days that are not supposed to be highlighted (days outside of the range) will be highlighted. if March 13th is selected, then if you start hovering around any other month, the 13th that month will have the css class .react-datepicker__day--keyboard-selected, making all of the days between have the in-selecting-range class that enables the highlight
Screenshots
Desktop (please complete the following information):
-
Browser Mozilla Firefox
-
Device: Thinkpad laptop
-
OS: Windows 11
Observing the same issue. Here are some screenshots if it helps showing the .react-datepicker__day--keyboard-selected class is applied to the same day every month:
I'll work on this issue.
@kibasaur, I think we're setting the react-datepicker__day--keyboard-selected as the same date in the months regardless of the selected month which will help user to remember the date they selected. It's also helping us to start the keyboard navigation from the same date on any month. It'll just pre-select that selected date for all months.
I fixed the issue, will raise a PR by tomorrow
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 10 days.
This issue was closed because it has been stalled for 10 days with no activity.