Focus navigation breaks with disabled days
Bug description
When navigating the calendar with the keyboard the focus breaks when the day to focus is disabled
To reproduce
Code sandbox: https://codesandbox.io/s/react-day-picker-8-vl4ry
Steps
Focus the calendar and move with the arrows until a disabled day is met. The focus get lost.
Expected behavior
The focus should get to the next (or previous?) focusable (not disabled) day. If there are no days to navigate to, the focus should stay in the last navigable day.
Additional notes
Test should check all the keyboard combinations. Consider the specific use cases (e.g. navigate end of week when end of week is disabled).
@tjfred35 do you think the recent updates to focus may help fixing this?
No -- those updates only changed the initial focus. This is still an issue.
Is this in the plans to be fixed? It has a further issue, see this sandbox: https://codesandbox.io/s/sandpack-project-forked-i07lee?file=/App.tsx If one selects the 3rd of January 2015 and then left arrow 3 times it will jump into the disabled month. From there the arrow keyboard navigation is no longer working.
I'm also seeing this issue and the one that @milorava mentioned above. Is there any move to fix this?
If #1449 get fixed probably we can move forward and fix this one too!
Is this in the plans to be fixed? Is there any move to fix this?
Yes @caydgreen @milorava please consider sponsoring my work: https://github.com/sponsors/gpbl 🙏