Changelog History
Page 7
-
v2.0.3 Changes
May 24, 2016π¦ Included the dist version in the npm package.
-
v2.0.2 Changes
May 24, 2016π Fixed a bug when
canChangeMonth
is set totrue
(#168). -
v2.0.1 Changes
May 15, 2016π Fix npm release.
-
v2.0.0 Changes
May 15, 2016π This release mainly improves the componentβs API (thus some breaking changes) and add some new props.
β Code has been split in multiple components and tests have been rewritten with β enzyme. It should be easier to add and test the upcoming new features!
π Thanks everyone for the support and for the help on making this component better π€ If you have issues or suggestions, don't forget the Spectrum Chat!
π₯ Breaking changes
- The
onDay*
event handlers receive as third argument an object of modifiers instead of an array.
This mean that if you where writing:
onDayClick(e, day, modifiers) { if (modifiers.indexOf('selected') > -1) { console.log('This day is selected') } }
you must now write:
onDayClick(e, day, modifiers) { if (modifiers.selected === true) { console.log('This day is selected') } }
π or better:
onDayClick(e, day, { selected }) { if (selected) { console.log('This day is selected') } }
β Removed
onDayTouchTap
. UseonDayClick
instead. If you need more granularity over touch events, you can use the newonDayTouchStart
andonDayTouchEnd
props. See #153 for more details.π Fixed import with CommonJS modules (#136).
0οΈβ£ This affects code using
require('react-day-picker').default
or similar syntax, which was required for v1.3.0. Now you canrequire('react-day-picker')
as 0οΈβ£ usual, i.e. without specifyingdefault
. If you are using ES2015 modulesimport DayPicker from 'react-day-picker'
, this change shouldn't affect you.- π New
formatDay
function in LocaleUtils.
If you are using your π custom LocaleUtils to localize the calendar, you need to implement this function as well, which is required to format the newly added π aria-label attribute (see the π documentation for an example). If you are localizing π using moment, this change shouldn't affect you.
π New props
- π New
disabledDays
andselectedDays
props. They receive a function(day) => Bool
as value to easily define which day should have theselected
ordisabled
modifiers. See #34 for more details.
So if you were writing something like:
<DayPicker modifiers={ ({ selected: day => isDaySelected(day) }, { disabled: day => isDayDisabled(day) }) } />
now you can write:
<DayPicker selectedDays={day => isDaySelected(day)} disabledDays={day => isDayDisabled(day)} />
- β Added
reverseMonths
prop to render the most recent month first. (#147 by [sonrtomas](sonrtomas)) - β Added
onDayKeyDown
,onDayTouchStart
,onDayTouchEnd
props.
π Improvements
- Navigate between weeks or years using left/right or up/down arrow keys (#132 by limscoder)
- β Added various
aria-*
attributes (#132 by limscoder)
π Bug fixes
- Navigation with keyboard when using
fromMonth
orendMonth
- The
-
v1.3.2 Changes
April 10, 2016β Adds React 15 to the peer dependencies.
-
v1.3.1 Changes
March 02, 2016π Fixes an issue causing className being overwritten by
className
prop (#137). -
v1.3.0 Changes
February 18, 2016π Improvements
- π Support for Babel 6
(#90)
- See this known issue
- π HTML props are spread to container tag, so to support
onBlur
,onFocus
, etc. (#122, #123) - π Better RTL support for month navigation (#125)
- π Support for Babel 6
(#90)
-
v1.2.0 Changes
December 04, 2015π New features
- π Use a custom caption element with the new
captionElement
prop. A custom caption element is useful, for example, to create a year/month navigation as shown in this example. Read #52 for a discussion about this feature.
π Improvements
- π Improved navigation when clicking on outside days (#112, see also this example)
- π New
addMonths
function in DateUtils - β Added a style definition to package.json (#105, thanks @webbushka)
π Fixed bugs
- π Make the component working again with React ~0.13 (#108)
- π Fixed: a bug when clicking on outside days when
fromMonth
ortoMonth
were set (#97) - Replace a wrong
attr
tag with the rightabbr
in the weekdays row β https://github.com/gpbl/react-day-picker/issues/33#issuecomment-159751186. β οΈ Please note that the component may now use the CSS defined forabbr
tags.
- π Use a custom caption element with the new
-
v1.1.5 Changes
November 20, 2015π Fix an issue with
showMonth()
(#95) β thanks @JKillian -
v1.1.4 Changes
November 19, 2015Minor changes when importing utilities