Accessibility issue - when setting`startDate` to`null` date picker loses selected date
Describe the bug
For inline date picker when settingstartDate tonull date picker loses selected date. The current date has tabindex='-1'. Date picker with input mode works as expected.
To Reproduce Steps to reproduce the behavior:
- Go to (https://reactdatepicker.com/#example-open-to-date)
2 On the first default example add
inlineproperty for<DatePicker /> - Add button and onClick call
setStartDate(null)<button onClick={() => setStartDate(null)}> Clear date </button> - Select date.
- Click Clear date button
- See that date picker day loses focus
- Can not go with tab to that month container
Expected behavior
After setting startDate to null current date suppose to have tabindex='0'. The same behavior as using date picker with input.
Screenshots If applicable, add screenshots to help explain your problem.
https://user-images.githubusercontent.com/49157108/169311971-f9cc1b90-16e8-419e-a554-e0110c4c48ed.mov
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.