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

MonthYearPicker: Excluded/Disabled Months are able to be navigated to with keyboard #4731

Closed
ryantanrk opened this issue Apr 26, 2024 · 3 comments

Comments

@ryantanrk
Copy link
Contributor

ryantanrk commented Apr 26, 2024

Describe the bug
When a month year picker has excluded dates excludeDates, without any value selected, the date picker is able to navigate to the excluded month, but with value selected, we cannot navigate to the excluded month.

When that excluded month is selected, it throws an invalid time value error:
image

To Reproduce
Steps to reproduce the behavior:

  1. Open calendar with a excluded month and selected is null
  2. Use arrow keys to try and navigate to that excluded month
  3. Excluded month should be pre selected (For invalid time value error select with Enter or Space and try to use the arrow keys again)
  4. Select an available month with the keyboard
  5. Open the calendar again
  6. Try to navigate to the excluded month
  7. Pre selection will stay the same

Expected behavior
Consistent behavior when there is a value selected and when there is no value selected. I suggest the date picker should skip over the excluded date when navigated to with the keyboard

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Firefox
  • Version: 125.0.2 (64-bit)

Storybook v7.5.3

@ryantanrk
Copy link
Contributor Author

ryantanrk commented Apr 26, 2024

I have made a pull request to address the error being thrown when excluded month is selected with keyboard #4732

@ryantanrk
Copy link
Contributor Author

POC for skipping excluded dates ryantanrk#1

@ryantanrk ryantanrk changed the title MonthYearPicker: Excluded Months are able to be navigated to with keyboard if there is no value selected MonthYearPicker: Excluded Months are able to be navigated to with keyboard May 22, 2024
@ryantanrk ryantanrk changed the title MonthYearPicker: Excluded Months are able to be navigated to with keyboard MonthYearPicker: Excluded/Disabled Months are able to be navigated to with keyboard May 22, 2024
@ryantanrk
Copy link
Contributor Author

Since the pull request has been merged, I will close this issue, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant