Skip to content

fix: disallow focus of calendar cells outside the month #8129

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Persists
Copy link
Contributor

Closes #8128

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@Persists Persists force-pushed the fix-outside-month-calendar-cell-focus branch from 56252a2 to 78d2908 Compare April 22, 2025 14:05
Copy link
Member

@LFDanLu LFDanLu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! This seems to fix the issue with keyboard navigation when the duplicate dates aren't hidden via display: none but will need to test for cases such as were described in #3257 (comment) (I doubt it since this is unrelated to making this "outside dates" interactive).

We should probably add additional styling to the story to not apply selected styles on dates that are outside the current month so that you don't get the following effect:
image
bit confusing when I first saw it

@Persists
Copy link
Contributor Author

Thank you for the review! 👍

I've updated the styles to exclude selected states for dates outside the current month.

If there is anything else i can improve additionally to help you, please let me know!

grafik

@Persists Persists force-pushed the fix-outside-month-calendar-cell-focus branch from 8271bd3 to c693e01 Compare May 20, 2025 14:10
Copy link
Member

@LFDanLu LFDanLu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine, will see about getting another person on the team to take a look

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.

CalendarCell outside the current month receive focus incorrectly in multi-month view
2 participants