DayPicker v10 removes the public APIs deprecated in v9 and introduces a new @daypicker/react package name. Non-Gregorian calendars are now published as standalone @daypicker/* packages.
If your app already uses the current v9 API, the upgrade should be relatively small. If your app still relies on deprecated v9 APIs, those usages should be updated before upgrading.
See the full upgrade guide: https://daypicker.dev/upgrading
Install
npm install react-day-picker@latestFor new projects, prefer the scoped package name:
npm install @daypicker/react@latestimport { DayPicker } from "@daypicker/react";
import "@daypicker/react/style.css";The react-day-picker package remains available in v10 for compatibility.
Breaking Changes
Deprecated navigation props removed
| Removed prop | Use instead |
|---|---|
fromMonth
| startMonth
|
fromYear
| startMonth={new Date(year, 0)}
|
toMonth
| endMonth
|
toYear
| endMonth={new Date(year, 11)}
|
fromDate
| hidden={{ before: date }} and optionally startMonth
|
toDate
| hidden={{ after: date }} and optionally endMonth
|
Deprecated focus and event props removed
| Removed prop | Use instead |
|---|---|
initialFocus
| autoFocus
|
onWeekNumberClick
| A custom WeekNumber component
|
onDayKeyUp
| A custom DayButton component
|
onDayKeyPress
| A custom DayButton component
|
onDayPointerEnter
| A custom DayButton component
|
onDayPointerLeave
| A custom DayButton component
|
onDayTouchCancel
| A custom DayButton component
|
onDayTouchEnd
| A custom DayButton component
|
onDayTouchMove
| A custom DayButton component
|
onDayTouchStart
| A custom DayButton component
|
Deprecated aliases removed
| Removed API | Use instead |
|---|---|
formatMonthCaption
| formatCaption
|
formatYearCaption
| formatYearDropdown
|
labelDay
| labelDayButton
|
labelCaption
| labelGrid
|
isMatch
| dateMatchModifiers
|
isDateInRange
| rangeIncludesDate
|
Other removed compatibility APIs
- Removed deprecated type exports from
types/deprecated. - Removed the deprecated
components.Buttoncustomization entry. UsePreviousMonthButtonandNextMonthButton. - Removed deprecated
DeprecatedUIcompatibility typing forclassNamesandstyles. - Removed deprecated DateLib exports:
FormatOptions,LabelOptions,dateLib, andDateLib.Date. - Removed the deprecated
react-day-picker/jalalisubpath. Use the Persian calendar package instead.
Calendar Package Changes
Non-Gregorian calendars are now published as standalone packages under the @daypicker/* scope:
npm install @daypicker/react @daypicker/persian
npm install @daypicker/react @daypicker/hebrew
npm install @daypicker/react @daypicker/buddhist
npm install @daypicker/react @daypicker/ethiopic
npm install @daypicker/react @daypicker/hijriThe amET locale export moved to @daypicker/ethiopic.
Fixes
- Fixed dropdown navigation in multi-month calendars so changing month or year shows the expected month.
What's Changed
- feat!: remove deprecated public APIs by @gpbl in #2920
- feat!: extract
@daypicker/hijriand@daypicker/persianby @gpbl in #2938 - feat!: extract
@daypicker/buddhist,@daypicker/ethiopic, and@daypicker/hebrewby @gpbl in #2939 - feat: add
@daypicker/reactas the preferred package name by @gpbl in #2970 - fix: move the
amETlocale export to@daypicker/ethiopicby @gpbl in #2968 - fix: show the expected month after dropdown changes in multi-month calendars by @hackgray47-eng in #2977
Full Changelog: v9.14.0...v10.0.0