This release addresses an accessibility issue, adds a new animate prop and fixes other minor bugs.
Possible Breaking Change in Custom Styles
To address a focus lost bug affecting navigation buttons, we updated the buttons to use aria-disabled instead of the disabled attribute.
This change may cause custom styles for those disabled buttons to break. To fix it in your code, update the CSS selector to target [aria-disabled="true"]:
- .rdp-button_next:disabled,
+ .rdp-button_next[aria-disabled="true"] {
/* your custom CSS */
}
- .rdp-button_previous:disabled,
+ .rdp-button_previous[aria-disabled="true"] {
/* your custom CSS */
}
Animating Month Transitions
Thanks to the work by @rodgobbi, we have added animations to DayPicker. The new animate prop enables CSS transitions for captions and weeks when navigating between months:
<img width="500" src="https://github.com/user-attachments/assets/26b6d7ad-f0e8-4b2c-9bdd-a2e61b044db7">
<DayPicker animate />
Customizing the animation style can be challenging due to the HTML table structure of the grid. We may address this in the future. Please leave your feedback in DayPicker Discussions.
What's Changed …