- Stop mutating
datein createDateObjects method (thanks @florentdestremau) - Babel 6 -> 7. React 15.x is now minimum.
- Add
contentClassNameandcontainerClassNameprops.
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
renderHeaderto allow using a different header component.
- Remove lodash dependency
- Add
onChangeMonthas a replacement foronPrevMonthandonNextMonth.
- 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/>.