What changed in React DayPicker from 9 to 10

3 releases numbered after v9.14.0 up to and including v10.0.2, stable releases only. v9.14.0 and v10.0.2 are the newest stable releases of 9 and 10 we track; this page follows them as new ones ship.

24 changes across 3 releases

Added 2

v10.0.0

  • New @daypicker/react package name is available and preferred for new projects, while react-day-picker remains available for compatibility
  • Non-Gregorian calendars are published as standalone @daypicker/* packages, including persian, hebrew, buddhist, ethiopic, and hijri
Changed 1

v10.0.0

  • The amET locale export moved to @daypicker/ethiopic
Fixed 13

v10.0.2

  • Preserve focus when controlled month changes replace the focused day
  • Import date-fns functions and DayPicker locales from their subpaths
  • Avoid loading all date-fns locales when importing a locale subpath
  • Preserve focus when controlled month changes replace the focused day in @daypicker/react
  • Import date-fns functions and DayPicker locales from their subpaths in @daypicker/react
  • Avoid loading all date-fns locales when importing a locale subpath in @daypicker/react
  • Import date-fns functions and DayPicker locales from their subpaths in @daypicker/buddhist
  • Import date-fns functions and DayPicker locales from their subpaths in @daypicker/ethiopic
  • Import date-fns functions and DayPicker locales from their subpaths in @daypicker/hebrew
  • Import date-fns functions and DayPicker locales from their subpaths in @daypicker/hijri

v10.0.1

  • Apply inline styles to all component slots
  • Add @types/react as an optional peer dependency

v10.0.0

  • Dropdown navigation in multi-month calendars now shows the expected month when changing month or year
Removed 8

v10.0.0

  • Deprecated navigation props fromMonth, fromYear, toMonth, toYear, fromDate, and toDate are removed in favor of startMonth, endMonth, and hidden
  • Deprecated focus and event props initialFocus and onWeekNumberClick, onDayKeyUp, onDayKeyPress, onDayPointerEnter, onDayPointerLeave, onDayTouchCancel, onDayTouchEnd, onDayTouchMove, and onDayTouchStart are removed in favor of autoFocus, a custom WeekNumber component, or a custom DayButton component
  • Deprecated aliases formatMonthCaption, formatYearCaption, labelDay, labelCaption, isMatch, and isDateInRange are removed in favor of formatCaption, formatYearDropdown, labelDayButton, labelGrid, dateMatchModifiers, and rangeIncludesDate
  • Deprecated type exports from types/deprecated are removed
  • Deprecated components.Button customization entry is removed in favor of PreviousMonthButton and NextMonthButton
  • Deprecated DeprecatedUI compatibility typing for classNames and styles is removed
  • Deprecated DateLib exports FormatOptions, LabelOptions, dateLib, and DateLib.Date are removed
  • Deprecated react-day-picker/jalali subpath is removed in favor of the Persian calendar package

Original release notes, newest first

The list above is our reading of these notes; the originals from gpbl are here, one fold per release.

v10.0.2
What's Changed
react-day-picker
  • fix: preserve focus when controlled month changes replace the focused day. #3010 by @gpbl
  • fix: import date-fns functions and DayPicker locales from their subpaths #3020 by @amanokh
  • fix: avoid loading all date-fns locales when importing a locale subpath. #3007 by @huuyafwww
@daypicker/react
  • fix: preserve focus when controlled month changes replace the focused day. #3010 by @gpbl
  • fix: import date-fns functions and DayPicker locales from their subpaths #3020 by @amanokh
  • fix: avoid loading all date-fns locales when importing a locale subpath. #3007 by @huuyafwww
@daypicker/buddhist
  • fix: import date-fns functions and DayPicker locales from their subpaths #3020 by @amanokh
@daypicker/ethiopic
  • fix: import date-fns functions and DayPicker locales from their subpaths #3020 by @amanokh
@daypicker/hebrew
  • fix: import date-fns functions and DayPicker locales from their subpaths #3020 by @amanokh
@daypicker/hijri
  • fix: import date-fns functions and DayPicker locales from their subpaths #3020 by @amanokh

View originalPermalink

v10.0.1
What's Changed
New Contributors

Full Changelog: https://github.com/gpbl/react-day-picker/compare/v10.0.0...v10.0.1

View originalPermalink

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@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 propUse instead
fromMonthstartMonth
fromYearstartMonth={new Date(year, 0)}
toMonthendMonth
toYearendMonth={new Date(year, 11)}
fromDatehidden={{ before: date }} and optionally startMonth
toDatehidden={{ after: date }} and optionally endMonth
Deprecated focus and event props removed
Removed propUse instead
initialFocusautoFocus
onWeekNumberClickA custom WeekNumber component
onDayKeyUpA custom DayButton component
onDayKeyPressA custom DayButton component
onDayPointerEnterA custom DayButton component
onDayPointerLeaveA custom DayButton component
onDayTouchCancelA custom DayButton component
onDayTouchEndA custom DayButton component
onDayTouchMoveA custom DayButton component
onDayTouchStartA custom DayButton component
Deprecated aliases removed
Removed APIUse instead
formatMonthCaptionformatCaption
formatYearCaptionformatYearDropdown
labelDaylabelDayButton
labelCaptionlabelGrid
isMatchdateMatchModifiers
isDateInRangerangeIncludesDate
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: https://github.com/gpbl/react-day-picker/compare/v9.14.0...v10.0.0

View originalPermalink