-
-
Notifications
You must be signed in to change notification settings - Fork 515
Upgrade guide from version 2.x to 3.x
To make development of new features easier, React-Calendar 3.x drops support for React 15.x and older versions of React 16. You will need to upgrade to at least React 16.3 to be able to use React-Calendar 3.x.
React-Calendar used to import required CSS automatically. This proven to be confusing to our users both because they got unexpected errors about CSS (like Unexpected token .
), and because it was hard to import React-Calendar without the default styles. If you'd like to continue using default styles, check README instructions on custom styling.
React-Calendar 3.x no longer ships with typings. We're currently looking for contributors willing to migrate them to DefinitelyTyped. Read more.
Functions passed as formatMonth
, formatMonthYear
(along with a newly added formatYear
) props are now used for tile rendering as well. Previously, they were only meant for Navigation component title bar. This means that if you used these functions to push additional text to Navigation component title bar, in React-Calendar 3.x it will affect the tiles, too.
For better clarity on what this onActiveDateChange
callback is for, it got renamed to onActiveStartDateChange
for it to be in line with activeStartDate
prop.
"Now" tiles (current day/month/year/decade…) have new default styling with yellow highlight. If you don't want the new highlight, remove it using by applying your own styling to .react-calendar__tile--now
class.