npm react-day-picker 10.0.0
v10.0.0

11 hours ago

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@latest

For new projects, prefer the scoped package name:

npm install @daypicker/react@latest
import { 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.Button customization entry. Use PreviousMonthButton and NextMonthButton.
  • Removed deprecated DeprecatedUI compatibility typing for classNames and styles.
  • Removed deprecated DateLib exports: FormatOptions, LabelOptions, dateLib, and DateLib.Date.
  • Removed the deprecated react-day-picker/jalali subpath. 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/hijri

The 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/hijri and @daypicker/persian by @gpbl in #2938
  • feat!: extract @daypicker/buddhist, @daypicker/ethiopic, and @daypicker/hebrew by @gpbl in #2939
  • feat: add @daypicker/react as the preferred package name by @gpbl in #2970
  • fix: move the amET locale export to @daypicker/ethiopic by @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

Don't miss a new react-day-picker release

NewReleases is sending notifications on new releases.