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

Week number buttons accessibility issue #5280

Closed
sarates opened this issue Dec 16, 2024 · 1 comment · Fixed by qburst/react-datepicker-3#41 or #5291
Closed

Week number buttons accessibility issue #5280

sarates opened this issue Dec 16, 2024 · 1 comment · Fixed by qburst/react-datepicker-3#41 or #5291

Comments

@sarates
Copy link

sarates commented Dec 16, 2024

Describe the bug
When using a datepicker with both showWeekPicker and showWeekNumbers enabled, the week number buttons remain interactive (clickable) even if the corresponding weeks are disabled due to excludeDateIntervals or filterDate conditions (days are disabled). This leads to unexpected behavior where users can click on weeks that should not be accessible (week doesn't change, datepicker just closing). All week buttons have react-datepicker__week-number react-datepicker__week-number--clickable class name.

To Reproduce
Steps to reproduce the behavior:

showWeekNumbers
showWeekPicker
excludeDateIntervals={[
  {
     start: moment().subtract(15, 'days').toDate(),
     end: moment().subtract(1, 'days').toDate(),
   },
]}
filterDate={isTimeInTheFuture}

Expected behavior
Week number buttons should be disabled.

Screenshots
Screenshot 2024-12-16 at 12 49 33

@balajis-qb
Copy link

I am working on it. Please assign this issue to me. I'll raise a PR once I complete the test case updates for the changes I made. Thank you.

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