Releases: gpbl/react-day-picker
v10.0.0
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 v10 changelog, the upgrade guide, and the v10 announcement for questions and upgrade feedback.
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
v8.10.2
Expands the React peer dependency to include React 19, helping projects still using DayPicker v8 adopt newer React versions without peer dependency warnings.
Upgrading to v9
Please note that DayPicker v8 is in maintenance mode. This release is intended to help existing v8 users stay unblocked, but upgrading to v9 is recommended when possible.
If you are still on v8, review the updated upgrade guide:
https://daypicker.dev/upgrading-v8-to-v10
What's Changed
Full Changelog: v8.10.1...v8.10.2
v9.14.0
This release introduces a new resetOnSelect prop and adds support for the Hijri calendar.
Resetting Selections in Range Mode
When in range selection mode, use the new resetOnSelect prop to start a new range when a full range is already selected.
Hijri Calendar
To use the Hijri (Umm al-Qura) calendar, import DayPicker from react-day-picker/hijri:
import { DayPicker } from "react-day-picker/hijri";
export function HijriCalendar() {
return <DayPicker />;
}Read more in the documentation and play with it in playground.
What's Changed
- feat: Add Hijri calendar support (Umm al-Qura) by @ws-rush in #2904
- feat: New
resetOnSelectprop to reset date range when selecting date with completed range by @rodgobbi in #2906 - feat: add default
langprop to DayPicker root element by @gpbl in #2907
New Contributors
Full Changelog: v9.13.2...v9.14.0
v9.13.2
What's Changed
- fix(build): add correct type declaration for style.css export by @NotNestor in #2897
- fix(locale): correct Northern Sami (se) and Japanese Hiragana (ja-Hira) labels by @gpbl in #2898
New Contributors
- @NotNestor made their first contribution in #2897
Full Changelog: v9.13.1...v9.13.2
v9.13.1
v9.13.0
This release introduces an experimental noonSafe prop to help deal with historical time zones with second offsets. See https://daypicker.dev/localization/setting-time-zone#noonsafe for more details.
What's Changed
Full Changelog: v9.12.0...v9.13.0
v9.12.0
This release adds translated labels to built-in locales and fixes issues with array modifiers and the Hebrew calendar.
Translated Locales
DayPicker locales now ship with localized labels (e.g., “Go to next month”, “Today”), so you no longer need to supply them via labels. To use a locale:
import { es } from "react-day-picker/locale";
<DayPicker locale={es} /> // Use Spanish locale, now with translated labels.If you previously set the labels prop for translations, you can remove it. For details on switching locales, see https://daypicker.dev/localization/changing-locale.
What's Changed
- feat: add locale-aware labels and translated locale wrappers by @gpbl in #2861
- fix: match
Date[]modifiers by day by @gpbl in #2865 - fix: correct Hebrew date conversion timezone handling by @gpbl in #2870
Full Changelog: v9.11.3...v9.12.0
v9.11.3
Rendered HTML now includes empty cells in grids when endMonth is set, and fixes the v9.11.2 regression where JSDOM tests could fail when focusing disabled days.
Possible low impact breaking change: The grid markup changed, so brittle snapshot tests or custom CSS that depended on the old structure may need updates. Adjust snapshots/CSS accordingly.
What's Changed
- fix: ensure final week renders when
endMonthclips the calendar by @gpbl in #2856 - fix: prevent selecting disabled focused days by @gpbl in #2860
Full Changelog: v9.11.2...v9.11.3
v9.11.2
What's Changed
- fix: ensure modifiers honor the
timeZoneprop by @gpbl in #2849 - fix: allow focused disabled days to remain focusable by @gpbl in #2851
- chore(performance): cache resolved today across helpers for better performance by @gpbl in #2848
- chore(performance): memoize calendar and reuse ISO date ids in day rendering by @gpbl in #2850
Full Changelog: v9.11.1...v9.11.2