v9.0.0
DayPicker v9 is a major release including significant updates related to accessibility, customization and localization.
- See the updated docs at https://daypicker.dev and the upgrading Guide for more details.
Install the Latest Version
npm install react-day-picker@latest
What’s New
- Moved
date-fns
from peer dependencies to dependencies. - Added support for UTC dates and Jalali Calendar.
- Enhanced accessibility to better comply with WCAG 2.1 recommendations.
- Simplified styles and new CSS variables for easier customization.
- Improved selection logic for range mode.
- New
dropdown-years
anddropdown-months
caption layouts. - New
hideWeekdayRow
andhideNavigation
props. - Updated for a complete custom components support.
- Improved typings and props for better compatibility in TypeScript
strict
mode.
Breaking Changes
While we tried to keep the API as stable as possible, some breaking changes were necessary to improve the library:
- The updated ARIA labels could require new translations or updated unit tests selectors.
- Custom CSS styles will likely break, due to the updated CSS classes and simplified styles.
- Custom Components have new API and may break.
- Some typings have been renamed or deprecated.
- The
useInput
hook has been removed. See Input fields guide for more details. onWeekNumberClick
has been removed. Use a custom component to handle week number clicks.- The updated build system to ESM and CommonJS could break some custom bundler.
Upgrading Guide
We prepared a Upgrading guide for help upgrading your app to v9. We welcome feedback about the upgrade process, to ensure it's smooth for everyone.
Compatibility
DayPicker v9 is compatible with React 16.8+.
Get Support and Report Issues
Get support, report issues, and provide feedback on the Discussion forums. Thanks.
New Contributors
- @grzegorzpokorski made their first contribution in #2124
- @zaaakher made their first contribution in #2137
- @ArthurGoupil made their first contribution in #2230
- @johnnysedh3lllo made their first contribution in #2252
- @xardit made their first contribution in #2254
- @dave-meyer made their first contribution in #2231
- @benasher44 made their first contribution in #2249
- @RyanCavanaugh made their first contribution in #2275
- @kesoji made their first contribution in #2281