Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Using min breaks range selection with keyboard #1968

Open
staaky opened this issue Nov 7, 2023 · 0 comments
Open

Bug: Using min breaks range selection with keyboard #1968

staaky opened this issue Nov 7, 2023 · 0 comments
Labels
Bug Bug or Bug fixes To Investigate Needs more investigation from the mantainers

Comments

@staaky
Copy link

staaky commented Nov 7, 2023

Bug description

Using min breaks keyboard selection after selecting the first date of a range.

This seems to be caused by the initial date of the range ending up disabled after hitting Enter.

Along that same line, if you use disabled instead of min and the date you've just selected ends up disabled, it also breaks keyboard selection.

To reproduce

https://codesandbox.io/s/react-daypicker-forked-3kd7lr?file=/src/App.tsx

Steps

  1. Press Tab to get to a date.
  2. Press Enter to select the first date of the range.
  3. Try to use the arrow keys to get to a second date.

Expected behavior

After hitting Enter on the first Date, which then becomes disabled, the selection should jump to the next selectable date and you should be able to use arrow keys to complete selection of the range.

If you are using disabled instead of min and it ends up disabling the day you've just selected with Enter, you would expect this same behavior where the active selection is moved to the next selectable date.

@staaky staaky added the Bug Bug or Bug fixes label Nov 7, 2023
@gpbl gpbl added the To Investigate Needs more investigation from the mantainers label Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug or Bug fixes To Investigate Needs more investigation from the mantainers
Projects
None yet
Development

No branches or pull requests

2 participants