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

Able to focus on disabled months. #4847

Open
asada-no4 opened this issue May 31, 2024 · 4 comments
Open

Able to focus on disabled months. #4847

asada-no4 opened this issue May 31, 2024 · 4 comments

Comments

@asada-no4
Copy link
Contributor

asada-no4 commented May 31, 2024

Describe the bug
The month that has been set to disabled by setting maxDate or minDate receives focus when the tab key is pressed.

To Reproduce
Steps to reproduce the behavior:

  1. Set showMonthYearPicker to display the month picker
  2. Disable December using maxDate
  3. Display the previous year
  4. Press the tab key to focus on the month, and press the crosshair key to focus on December.
  5. Click the Arrow button to display the following year
  6. Press tab key to focus on the month←Focus is given to December in the disable state

Expected behavior
Focus will be on November in ACTIVE state.

@balajis-qb
Copy link

balajis-qb commented May 31, 2024

Hi @asada-no4 , it's working for me. can you please share the code

@asada-no4
Copy link
Contributor Author

Hi @balajis-qb , thank you for confirming.
Since it is difficult to share the code, I will share the example page of the datepicker.
https://reactdatepicker.com/#example-exclude-months-in-month-picker
The same procedure is buggy in the above EXCLUDED month.

@asada-no4
Copy link
Contributor Author

https://reactdatepicker.com/#example-month-picker
Or add the following line to the above code

maxDate={new Date().setMonth(10)}

@balajis-qb
Copy link

Hi @asada-no4 ,

I understand the issue now, I'll try to fix it. Thank you for raising it.

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

2 participants