NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #1626 most downloaded on npm
Customizable Date Picker for React
Last release 4 months ago
15 May 2026
Ships fairly regularly
a new release about every 3 weeks
Nearly every release is documented
notes for 59 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
12 years old
292 releases · first in 2014
(DayPickerInput) Fixed an error when year from input is too big
Release date: 2018-05-13
Fixed: tabIndex={0} was not passed to the container
One column per quarter.
Nothing published for this version
Added: isSameMonth, isDate functions to DateUtils.
Release date: 2018-04-15
isSameMonth, isDate functions to DateUtils.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fixed a flickering issue with mouse hover using the default style (#726 by sv3k)
Release date: 2018-07-07
classNames (#741 by hannescalibrate)component (#747)Nothing published for this version
(DayPickerInput) Fixed: daypickerProps.onMonthChange not being called (#604 by ah-adarlow)
Release date: 2018-01-09
daypickerProps.onMonthChange not being called (#604 by ah-adarlow)(DayPickerInput) Fixed: focusing behavior when pressing the TAB key
(Typescript) Various fixes to type definitions
Release date: 2017-12-03
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
You must pass additional props to the input component using the `inputProps` prop. _This is not a breaking change if you are just using placeholder or…
_Release Date: 2017-11-25
Breaking changes
enableOutsideDays prop is now named showOutsideDaysDayPickerInput, we removed the moment.js dependency and changed how to pass props to the input field (upgrade is easy, see below).- var DayPicker = require('react-day-picker`)
+ var DayPicker = require('react-day-picker`).default
v6.2.1 (see #533), use the default import:- import { DayPicker } from 'react-day-picker`;
+ import DayPicker from 'react-day-picker';
div with a .DayPicker-Months CSS class.If you find problems while upgrading, please add an issue, thanks!
New features
.DayPicker-Months container.renderWeek prop (#497 by jenshandersson)onTodayButtonClick prop (#529)showWeekDays prop. Set it to false to hide weekday namesmonth prop to navbarElement (#552)enableOutsideDays prop to showOutsideDaysBug fixes
DayModifiers and Modifiers back to type definitions file (#526 by azhangstrata)role="application" (#548 by trezy)Release date: PickerInpu
Breaking changes
The moment.js requirement #518, and you should use parseDate and formatDate props to parse and format the dates. If you want to keep using moment.js, your existing code should changes as follows:
import DayPicker from 'react-day-picker/DayPickerInput'
+ import { formatDate, parseDate, } from 'react-day-picker/moment';
function MyDayPicker() {
return (
<DayPickerInput
placeholder="Please choose a date"
format="LL"
+ formatDate={formatDate}
+ parseDate={parseDate}
>
);
}
See also this example.
You must pass additional props to the input component using the inputProps prop. This is not a breaking change if you are just using placeholder or value. E.g.:
<DayPickerInput
placeholder="Type a day"
value={this.state.selectedDay}
- onFocus={myFocusHandler}
- className="my-input-css"
+ inputProps={{
+ onFocus: myFocusHandler,
+ className: 'my-input-css,
+ }}
/>
New features
inputProps prop to pass additional props to the input componentparseDate and formatDate propsinputProps prop to pass additional props to the input componentoverlayComponent prop: useful to customize the overlay component (#477, thanks to wldcordeiro)numberOfMonths, selectedDays props from dayPickerProps (#513, #531 by hydrognomik). Useful for selecting range of days (example).showOverlay prop: shows the overlay at the initial rendering (useful for styling)getInput and getDayPicker public methodsfixedWeek prop. Use dayPickerProps ={{ fixedWeek: true }} to restore it.Bug fixes
Nothing published for this version
Added: TypeScript definitions for DayPickerInput (#487 by adidahiya and lpcarignan)
Release Date: 2017-10-05
Bug fixes
Added: React 16 as peer dependency (#498 by brycehill)
Added new `onDayMouseDown` and `onDayMouseUp` props (#445 by eldritchideen)
Release Date: 2017-07-09
Improvements
onDayMouseDown and onDayMouseUp props (#445 by eldritchideen)Bug fixes
Fixed: today button inside a form submits the form
Fixed: next and previous buttons not working via keyboard
DayPickerInput Call onDayChange(undefined, {}) when user empties the input field.
Nothing published for this version
Nothing published for this version
This major release focuses on performance, improves accessibility and fixes some bugs. There are some possible breaking changes, but they are easy to…
_Release Date: 2017-06-16
This major release focuses on performance, improves accessibility and fixes some bugs. There are some possible breaking changes, but they are easy to fix (read below).
Breaking changes
The container's HTML structure has changed: the interactive element used to focus the calendar has been moved into a wrapper to improve accessibility (#392):
<div className="DayPicker">
+ <div className="DayPicker-wrapper">
<!-- rendered stuff here -->
+ </div>
</div>
This is a breaking change if you are styling the component using your own CSS or with the classNames prop.
.DayPicker selector to .DayPicker-wrapper:- .DayPicker {
+ .DayPicker-wrapper {
classNames with the container prop, rename the container className to wrapper.The container element is now an inline-block element.
When using fromMonth/toMonth props, navigation buttons now are rendered and hidden via CSS. Before, the buttons were not rendered at all, and it was impossible to style them (#366)
This is a breaking change if you are using those props and styling the component using your own CSS or with the classNames prop.
In such cases, the buttons will be always shown even if the previous or the next months are not navigable.
.DayPicker-NavButton--interactionDisabled selector to your style with display: none.classNames, add a navButtonInteractionDisabled to your classNames with display: none to hide the buttons.Improved rendering performance using shouldComponentUpdate and PureComponent (#389)
It should not be a breaking change, but if something is not working for you when updating some props please file an issue 🙃
Improvements
{after, before} modifiers in the same object (#354). You can now write before/after modifiers such as disabledDays={ { before: aDate, after: aDate }}.clickUnselectsDay prop to unselect and clear the input when clicking on a previously selected day (#399)Bug fixes
You have an unlabeled element or control. shown with react-a11y (#386)month's dayPickerProps value (#380 by Yustynn)Improvements in the built version
These changes applies to the production build from the lib dir (e.g. that served from unpkg.com).
Bugfix for DayPickerInput: updated value prop now will be reflected in the component's state
Release date: 2017-05-25
DayPickerInput: updated value prop now will be reflected in the component's state (#363)Nothing published for this version
Nothing published for this version
Use the DayPickerInput component to render an input field interacting with the day picker (#213).
Release Date: 2017-05-09
New DayPickerInput component
Use the DayPickerInput component to render an input field interacting with the day picker (#213).
See example, docs and API reference.
New features
New todayButton prop (#329).
Use this prop to display a button on the calendar's footer to switch to the current month (example).
New showWeekDays and onWeekClick props (#304).
Use this props to display and interact with the year's week numbers (example).
New daysOfWeek modifiers type to match days of the weeks (#330).
For example, to match Sundays and Mondays:
<DayPicker
disabledDays={
- day => day.getDate() === 0 || day.getDate() === 1
+ daysOfWeek: [0, 1]
}
/>
Bugfix: isBeforeDay/isAfterDay functions where not exported correctly
Release date: 2017-05-06
isBeforeDay/isAfterDay functions where not exported correctly (#327)Bugfix: aria role in Week element (#322 by emily-plummer)
Release date: 2017-05-03
aria role in Week element (#322 by emily-plummer)Expose ModifiersUtils functions (#309 by cwmoo740)
Release Date: 2017-04-29
Expose ModifiersUtils functions (#309 by cwmoo740)
Use this set of functions if you need to validate or test your modifiers.
Nothing published for this version
Include Typescript Type Definitions
Release Date: 2017-04-25
modifiersStyles prop to add inline style to the days matching the given modifiers (see example).isDayBefore, isDayAfter functions to DateUtils.Bug fixes
Fixed PropTypes warnings in React 15.5.
Release date: 2017-04-14
PropTypes warnings in React 15.5.Nothing published for this version
Nothing published for this version
Allow overriding today modifier (#279 by maxdubrinsky)
Release Date: 2017-03-09
Allow overriding today modifier (#279 by maxdubrinsky)
Pass React Components to navBarElement, captionElement, weekdayElement (#280 by cwmoo740)
Fixed aria roles for weekdays and months HTML elements (#276 by oigewan)
Fixed: an issue with keyboard navigation when using classNames prop (#269 by oigewan, #275)
Use this prop to change the CSS class names or add support for CSS modules (#73, see this example).
Release Date: 2017-03-03
New classNames prop (#264).
Use this prop to change the CSS class names or add support for CSS modules (#73, see this example).
This differs from the initialMonth props as it causes the calendar to re-render when its value changes.
Added: aria-label attributes to the navigation bar with the new labels prop (#258).
Breaking change Event handlers signature has changed
_Release Date: 2017-02-14
This release focuses on improving perfomance and the component's api-daypicker.
New modifiers value types (#254)
Use dates, arrays, or ranges as modifier types, not just functions:
<DayPicker
- selectedDays={ day => DateUtils.isSameDay(day, this.state.selectedDay)}
+ selectedDays={ this.state.selectedDay }
/>
Read more in the modifiers documentation.
Breaking change Event handlers signature has changed (#256)
All events handlers like onDayClick, onCaptionClick, etc. now receive the Syntethic Event as last argument. Thus you must change your event handlers as follow:
onDayClick={
- (e, day, modifiers) => {
+ (day, modifiers, e)
e.preventDefault();
console.log(day);
console.log(modifiers);
}
}
Breaking change Use containerProps to pass props to the container div element. Before, any prop was passed to the container element degrading performance (#255):
<DayPicker
- data-thing="foo"
+ containerProps={ 'data-thing': 'foo' }
/>
Breaking change Updating initialMonth will not show anymore a different month after the first mount
_Release Date: 2017-02-10
Pass the day's modifiers to the renderDay prop function (#237)
Breaking change Updating initialMonth will not show anymore a different month after the first mount (#169)
If you need the calendar to display a different month, use the month prop.
Breaking change Use lang HTML attribute instead of a specific CSS class name.
This change may break your style or layout if you are styling the component according to the current locale. If this is the case, change your CSS to use the lang attribute selector. For examples, if you are styling the calendar for the de locale:
- .DayPicker--de {
+ .DayPicker[lang="de"] {
background: yellow;
}
Fixed an issue with IE and older Safari.
Release date: 2016-10-18
New months, weekdaysLong, weekdaysShort, firstDayOfWeek props to localize the component.
Release Date: 2016-10-14
months, weekdaysLong, weekdaysShort, firstDayOfWeek props to localize the component.Easier localization
With these new props you can localize the Day Picker in a more declarative way. Check out this example.
Fixed a bug with MomentLocaleUtils.
Release date: 2016-10-14
Removed weekdayComponent and navbarComponent props (deprecated from v2.3.0)
_Release Date: 2016-10-11
weekdayComponent and navbarComponent props (deprecated from v2.3.0)Breaking changes
For any locale, weekday names must now begin from Sunday, and the first day of week should reflect this change (hence to start from Monday, the first day of week is 1). See this #e1462b3 as example.
Build dist files as UMD module (#216 by pguimera).
Nothing published for this version
Added pageNavigation prop (#196 by zaygraveyard).
Release Date: 2016-07-31
pageNavigation prop (#196 by zaygraveyard).initialMonth (#198 by zaygraveyard).Fixed props warnings in React 15.2.0 (#191).
Release date: 2016-07-04
Fixed props warnings in React 15.2.0 (#191).
Removed superfluous deprecation warnings.
Release date: 2016-07-01
Removed superfluous deprecation warnings.
Nothing published for this version
navbarComponent and weekdayComponent props are deprecated. Please use navbarElement and weekdayElement:
Release Date: 2016-06-30
navbarElement and weekdayElement prop (#179 by boatkorachal).onDayFocus prop (#185 by johannesd).Deprecation notice
navbarComponent and weekdayComponent props are deprecated. Please use navbarElement and weekdayElement:
- <DayPicker navbarComponent={ MyCustomNavbar } weekdayComponent={ MyCustomWeekday } />
+ <DayPicker navbarElement={ <MyCustomNavbar/> } weekdayElement={ <MyCustomWeekday /> } />
Added fixedWeeks prop (#176 by fcsonline). Use this prop to always display 6 weeks per month: example.
Fixed compatibility with IE11 (#175 by davidspiess).
Release date: 2016-06-06
Fixed compatibility with IE11 (#175 by davidspiess).
Added `weekdayComponent` prop (#172 by stanislav-ermakov-roi). Use this prop to use a custom component for rendering the weekday cells in the header.
Release Date: 2016-06-02
weekdayComponent prop (#172 by stanislav-ermakov-roi). Use this prop to use a custom component for rendering the weekday cells in the header.navbarComponent prop (#173 by stanislav-ermakov-roi). Use this prop to use a custom component for rendering the navigation bar.Included the dist version in the npm package.
Release date: 2016-05-24
Included the dist version in the npm package.
Your coding agent can read these notes before it upgrades. Set up the MCP server →