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

[@mantine/dates]: Fix navigation order for date components #3728

Merged
merged 3 commits into from
Mar 21, 2023
Merged

[@mantine/dates]: Fix navigation order for date components #3728

merged 3 commits into from
Mar 21, 2023

Conversation

filiptammergard
Copy link
Contributor

@filiptammergard filiptammergard commented Mar 9, 2023

Fixes #3660.

DatePicker/Calendar:

  • Only add selected date to tab order when month has selected date.
  • Only add current date to tab order when no date is selected and current date is in month.
  • Only add first non-disabled date to tab order when no date is selected and current date is not in month.

MonthPicker:

  • Only add selected month to tab order when year has selected month.
  • Only add current month to tab order when no month is selected and current month is in year.
  • Only add first non-disabled month to tab order when no month is selected and current month is not in year.

YearPicker:

  • Only add selected year to tab order when decade has selected year.
  • Only add current year to tab order when no year is selected and current year is in decade.
  • Only add first non-disabled year to tab order when no year is selected and current year is not in decade.

@filiptammergard filiptammergard marked this pull request as ready for review March 9, 2023 09:10
@rtivital
Copy link
Member

@filiptammergard Are you planning to finish your work on this PR?

@filiptammergard
Copy link
Contributor Author

@filiptammergard Are you planning to finish your work on this PR?

Yeah, I'll try to make some time for this within the next couple of days. Feel free to continue from your side if you want—the most important thing for me is that tab order is improved since I'm using the component in some projects.

@filiptammergard
Copy link
Contributor Author

filiptammergard commented Mar 16, 2023

Hey @rtivital! Took some time to continue on this one and changed the approach to compute tab order based on all years/months/days instead, since you cannot determine tab order based on an isolated year/month/day without passing a bunch of arguments for context.

Is it missing something still?

@rtivital
Copy link
Member

Works great, thanks for your work on this issue!

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

Successfully merging this pull request may close these issues.

Unexpected tab order in calenader components
2 participants