react-datepicker icon indicating copy to clipboard operation
react-datepicker copied to clipboard

Accessibility issue - when setting`startDate` to`null` date picker loses selected date

Open TautvydasPetrauskas opened this issue 3 years ago • 1 comments

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:

  1. Go to (https://reactdatepicker.com/#example-open-to-date) 2 On the first default example add inline property for <DatePicker />
  2. Add button and onClick call setStartDate(null) <button onClick={() => setStartDate(null)}> Clear date </button>
  3. Select date.
  4. Click Clear date button
  5. See that date picker day loses focus
  6. 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

TautvydasPetrauskas avatar May 19 '22 14:05 TautvydasPetrauskas

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.

github-actions[bot] avatar Jun 15 '24 01:06 github-actions[bot]

This issue was closed because it has been stalled for 10 days with no activity.

github-actions[bot] avatar May 03 '25 02:05 github-actions[bot]