Changelog
DayPicker follows Semantic Versioning. See the Releases page on Github for the complete list of changes, diffs and contributors, or the list of versions published on npm.
v9β
First release: 2024-07-20
This release includes important updates related to accessibility, styles 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 time zones and Jalali Calendar.
- Enhanced accessibility to better comply with WCAG 2.1 recommendations.
- Simplified styles and new CSS variables for easier customization.
- New
excludeDisabled
prop 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.- Some of the
onDay*
events, likeonDayTouchStart
oronDayDoubleClick
have been removed. To reimplement them, use a customDayButton
component (example). - 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.
Get Support and Report Issuesβ
Please report any issues or provide feedback on the GitHub repository.
v8.10.1β
Release date: 2024-04-16
- build: fix Preact support by externalizing JSX runtime
- build: remove unused useIsomorphicLayoutEffect module
- fix(types): improved props for RootContext component
v8.10.0β
Release date: 2023-12-23
- feat: support for date-fns 3.0
- fix(types): cannot find module
types/Matchers
- fix(types):
firstWeekContainsDate
to be only Monday or Thursday- Note: this prop now supports only the value
1
(Monday) and4
(Thursday) instead of values from0
to6
. This change may break your type-check.
- Note: this prop now supports only the value
v8.9.1β
Release date: 2023-10-18
- fix(types):
PropsWithChildren
not compatible with React 17
v8.8.3β
Release date: 2023-10-14
- feat: support for
nonce
,lang
,title
global attributes - feat: new custom components "Months"
- feat: new
--rdp-selected-color
CSS variable for text of selected days - updated internal dependencies
v8.8.2β
Release date: 2023-09-12
- fix(a11y): remove redundant
rowgroup
role fromtbody
element
v8.8.1β
Release date: 2023-08-18
- fix: range not selected when missing the
from
value - fix: dropdown may navigate to the wrong month when multiple months are set
v8.8.0β
Release date: 2023-06-19
- feat: add custom ID to grid elements
v8.7.1β
Release date: 2023-04-12
- fix: cannot extend
DayPickerProps
,DataAttributes
interface
v8.7.0β
Release date: 2023-04-09
- feat(rendering): add
id
,data-
attributes to the root element - feat(style): add CSS variable for caption font size
- feat(style): uppercase weekday name
- fix(a11y): empty table header when showing week numbers
- fix(i18n): caption buttons inverted when using RTL direction and multiple months
v8.6.0β
Release date: 2023-02-18
- feat: new
dropdown-buttons
caption layout - feat: added
displayMonth
prop toFooter
v8.5.1β
Release date: 2023-01-27
- chore: improve ButtonProps type
v8.5.0β
Release date: 2023-01-24
- chore(a11y): accessibility improvements
- update
CaptionLabel
to have rolepresentation
- use
gridcell
directly in button, deprecatelabelDay
- update head rows labels
- use presentation role for table cells
- use
rowgroup
fortbody
- update
- build: updated rollup settings improving source maps and css types
- build(deps): updated internal dependencies
v8.4.1β
Release date: 2022-12-17
- feat: add
onDayPointerEnter
,onDayPointerLeave
props
v8.3.7β
Release date: 2022-11-20
- chore(style): add opacity to differentiate outside days
- fix(docs): minor typo in upgrading content
- fix(bug): matcherToArray should return a copy of the array
- build(deps): bump loader-utils from 2.0.2 to 2.0.4
v8.3.6β
Release date: 2022-11-06
- fix: set tab-index to 0 when day is focused
- Upgraded dependencies
v8.3.5β
Release date: 2022-10-10
- fix:
range_middle
class is added to days not in the selected range
v8.3.4β
Release date: 2022-10-09
- build: fix CSS module types
- fix: disable tab for outside days (#1567)
v8.3.1β
Release date: 2022-10-03
- fix: types for selection modes not being correctly set
- fix: isMatch to match open DateIntervals
v8.3.0β
Release date: 2022-09-26
- feat: add new
id
prop - feat: week localization props:
ISOWeek
,firstWeekContainsDate
- fix: infinite recursion when focusing next days
- fix: disabled modifiers with min/max range selections
- fix: improved CSS
focus-visible
and disabled styles - chore: updated
SelectSingleEventHandler
interface to type - chore: cleanup context types and defaults
- chore: use rollup-plugin-ts to compile typescript
- chore: add new
Components
type - chore: reorganize contexts files
v8.2.1β
Release date: 2022-09-08
- fix: CSS module doesn't include the root class
v8.2.0β
Release date: 2022-09-01
- new: custom
HeadRow
component - changed: add
HeadRow
component - fixed: selected day outlines in chrome
- fixed: dropdown focus-visible style
- fix: use aria-label for days buttons
v8.1.4β
Release date: 2022-08-28
- fix: use parsed
fromDate
/toDate
inuseInput
- changed: add names to fields and buttons
- changed: focus vs focus-visible styles
v8.1.3β
Release date: 2022-08-24
- fix:
onDayClick
called twice in selection mode - changed: accept
undefined
for the modifier props
v8.1.2β
Release date: 2022-08-22
- fix: do not focus disabled or hidden days
v8.1.1β
Release date: 2022-08-19
- fix: prevent focus from moving beyond
toDate
andfromDate
- fix: page keys not working when using
setMonth
- fix: add
onSelect
to theDayPickerContextValue
- fix: rdp class not added to root element when using
className
v8.1.0β
Release date: 2022-08-11
- new: add prefix to auto generated ids
- new:
addedToRange
to the exported utilities - new: revert to use
disabled
attribute instead ofaria-disabled
(reverts - new(css): use pure selector for CSS variables
- Note this may require some changes in your CSS
- fix:
@reach/auto-id
warnings by removing the dependency - fix: home/end buttons behavior with
startOfWeek
- package: upgraded dependencies
v8.0.7β
Release date: 2022-06-12
- fixed: missing
dropdown_year
CSS class inYearsDropdown
- fixed: Maximum update depth exceeded when select the range date
- website(chore): Upgrade docusaurus to beta 22
v8.0.6β
Release date: 2022-06-05
- fix(docs): fix typo
v8.0.5β
Release date: 2022-05-15
- fix(docs): typo in property name
- Use aria-disabled instead of disabled
v8.0.4β
Release date: 2022-04-14
- Added src directory to the package for better source maps
v7.4.9β
Release date: 2021-03-18
- Re-add
transform-react-remove-prop-types
to.babelrc
(#1165) - Add
null
toRangeModifier
(#1037) - Corrected typing for
RangerModifier
(#1065) - Add React 17 as peer dependency (#1075)
- Add
aria-polite
to announce month change during navigation (#1033)
v7.4.8β
Release date: 2020-04-19
- Fixed uncontrolled
DayPickerInput
causing the field not being cleared (#990 by @ntlf) - Fixed custom
classNames
breakingaria-
props (#1004 by @camflan) - Added
style
type toDayPickerInputProps
(#996 by @anilkabobo) - Fixed UMD build (#1009)
- (chore) Use moment
localeData
via documented API (#968)
v7.4](β
Release Date: 2019-10-20
Release date: # DayPicke
- Fix text wrapping on
.DayPicker-Day
default style (#824) - Add
focus()
method for focusing theDayPicker
wrapper element (#761)
Daβ
Release date: PickerInpu
- When DayPicker input state is controlled, correctly set the input text if the
value
prop updates (#816 by MitchRivet) - Fix DayPickerInput value does not recompute on
locale
change (fix #938) (#939) - Set overlayHasFocus to false in hideAfterDayClick (#941)
Release date: ### Typing
- Improve typings, use TypeScript 3.1 (#929)
- Add formatDate and parseDate to typings (#873)
- Make
format
optional (#923) - Remove
initialMonth
fromdefaultProps
(#874)
v7.3.2β
Release date: 2019-08-08
Updates for TypeScript users:
- added
tabIndex
to input component types (#909 by clarityflowers) - fixed types for utilities (#904 by Nibblesh and #899 by DylanVann)
v7.3](β
Release Date: 2019-02-21
Mostly an update for TypeScript users, few minor fixes, and two new minor props to the input component.
DayPicker
- Fixed: left/right keyboard navigation on RTL (#845 by johnjesse)
- Fixed: cancel keydown events (#844 by johnjesse)
- Fix for week number's
tabIndex
whenonWeekClick
is not defined (#818 by uosl) - TypeScript: added
isDate
andisSameMonth
toutils
definitions (#854 by rnons) - TypeScript: make months and weekdays types slightly less restrictive (#843 by johnjesse)
- TypeScript: add missing props to
weekdayElement
andcaptionElement
(#842 by johnjesse) - TypeScript: added missing
utils
export (#834 by davidspiess) - TypeScript: missing default entries to
classNames
(#833 by saenglert) - TypeScript: updated type definitions for
locale
(#828 by lukyth) - TypeScript: add definitions for moment locale utils (#806 by howlettt)
DayPickerInput
- Added
onDayPickerShow
prop (#831 by saenglert) - Added
style
prop (#832 by kirillku) - Typescript: fixed
classNames
definition (#796 by davidspiess)
v7.2.4β
Release date: 2018-09-13
- Fix regression: re-enabled click on disabled days (#789 by dewey92)
- Fixed an issue with paged navigation when using
toMonth
orfromMonth
props (#787)
v7.2](β
Release Date: 2018-08-27
DayPicker
- (CSS) Added
left: auto
to navigation buttons style for easier styling (#771 by DDDDDanica) - (CSS) Changed css to use
em
units (#777 by signalwerk) - (TypeScript) Added
undefined
andnull
as allowed modifier types (#775 by Lavoaster)
DayPickerInput
- Added
onDayPickerHide
prop onDayChange
will receive the component instance as third argument (useful for checking the input's value)- (TypeScript) Added top-level type definition for DayPickerInput (#762 by kryops)
- (TypeScript) Fixed definition for
DayPickerInput.dayPicker
top-level type definition for DayPickerInput (#790 by strax) - Fixed: input content was deleted when typing an invalid date in some cases (#778)