- Stop mutating
date
in createDateObjects method (thanks @florentdestremau) - Babel 6 -> 7. React 15.x is now minimum.
- Add
contentClassName
andcontainerClassName
props.
Breaking changes
- Make it more flexible by removing the wrapping div in
renderDay
. You are now in full control of the rendering. The default implementation is:
<Calendar
renderDay={({ day, classNames, onPickDate }) => (
<div
key={day.format()}
className={cx(
'Calendar-grid-item',
day.isSame(moment(), 'day') && 'Calendar-grid-item--current',
classNames
)}
onClick={e => onPickDate(day)}
>
{day.format('D')}
</div>
)}
/>
- Add
renderHeader
to allow using a different header component.
- Remove lodash dependency
- Add
onChangeMonth
as a replacement foronPrevMonth
andonNextMonth
.
- Switch to the prop-types package.
- Upgrade to Babel 6 and allow React 15
- Use Babel and ES6
- Move state out of the component
- Added week day headers (optional)
- Added onPickDate callback
require('react-calendar-component')
returns an object with all the elements instead of just<Calendar/>
.