Skip to content

v3.0.0

Compare
Choose a tag to compare
@wojtekmaj wojtekmaj released this 09 Mar 08:53
85b5b6a

❗️ = breaking change

What's new?

  • ❗️ React-Calendar now ships with ES6 Modules along with CommonJS modules. This allows for Webpack and other bundlers to optimize your code better.
  • React-Calendar can now be used as an uncontrolled component. Simply use defaultValue instead of value. More details in README (#217).
  • Added showDoubleView which causes React-Calendar to show two months/years/… at a time instead of one.
  • Added formatYear prop which allows you to customize formatting of year numbers (#241).
  • Added onViewChange callback prop called when the view is changed.
  • Added default color for "now" tile (current day/month/…) (#112).
  • Exposed events in in onChange, onClick* functions (#291).
  • tileClassName and tileContent now also get activeStartDate in arguments (#257).
  • Added locale to navigationLabel arguments (#317). Thanks, @zorfling!

What's changed?

  • ❗️ React-Calendar no longer supports React versions lower than 16.3 (#219).
  • ❗️ Typings are no longer shipped with React-Calendar package (#272).
  • ❗️ React-Calendar no longer imports its styles by default. If you want to continue to use them, import them separately as instructed in README.
  • ❗️ onActiveDateChange is now onActiveStartDateChange.
  • ❗️ Removed renderChildren backwards compatibility (#283).
  • React-Calendar now uses @wojtekmaj/date-utils for date calculations.
  • formatMonthYear is now used on month tiles in YearView.
  • Reduced code duplication (#277).
  • Refactored some elements of the package for bundle size optimizations.

Bug fixes

  • Fixed year not properly formatted in th-TH locale (#241).
  • Fixed handling dates in year < 100: clicking e.g. January 1st, 50 would cause the calendar to jump to January 1st, 1950.
  • Fixed Calendar subcomponents re-rendering too often because of callback functions being merged in a suboptimal way.