Description
Provide a general summary of the issue here
The issue arrises In the Calendar
component, when rendering the Calendar
with multiple months (i.e., when visibleDuration
> 1). Cells outside the current month receive focus instead of cells within the actual month.
This happens unless display: none
is applied to cells with isOutsideMonth
.
🤔 Expected Behavior?
The focus should be set only on the cells that represent dates within the current month. Cells outside the current month (in the next month) should not receive focus.
😯 Current Behavior
Cells outside the current month (in the next month) receive focus instead of the cells within the month, when the cells with isOutsideMonth
are not hidden with display: none
.
Screen.Recording.2025-04-22.at.15.41.25.mov
💁 Possible Solution
Currently, both the outside-month cell and the actual in-month cell receive focus because the isCellFocused
function doesn't check whether a cell is outside the month. This could be fixed by adding an argument to the useCalendarCell
hook to prevent focusing cells that are outside the month.
🔦 Context
No response
🖥️ Steps to Reproduce
navigate the focus with arrowkeys ([focus 28.10.2023] -> arrowRight)
Version
latest
What browsers are you seeing the problem on?
Firefox
If other, please specify.
No response
What operating system are you using?
MacOs
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response