rc
4.5/521

react-calendar

npm i react-calendar

75 Versions

4.0.0

latest
1 month ago

Note: React <16.8 is not supported. If you're still using React older than 16.8, please use react-calendar@^3.0.0 instead.

❗️ = breaking change

What's changed?
  • ❗️ Minimum React version is now 16.8.
  • Replaced merge-class-names with clsx.

3.9.0

3 months ago
What's new?
  • Added Navigation to exports list (#594).
  • Added formatWeekday prop (#620).

3.8.0

3 months ago
What's new?
  • Added …--weekend class to Weekdays tiles (#490). Thanks, @fffed!
  • Added goToRangeStartOnSelect prop (#639).

3.7.0

10 months ago
What's new?
  • Added support for React 18.
What's changed?
  • Improved performance of date formatters (#180).
Bug fixes
  • Fixed tileContent not updating on activeStartDate change (#576).

3.6.0

1 year ago
What's new?
  • Allow showFixedNumberOfWeeks to be explicitly defined even when showDoubleView is true (#413). Thanks, @frankleng!
Bug fixes
  • Fixed calendar tiles and week number misaligned (#412).
  • Fixed week numbers wrongly calculated for Arabic and Hebrew calendars in some cases (#578).
New contributors
  • @frankleng made their first contribution in #413.

3.5.0

1 year ago
What's new?
  • Added action to onActiveStartDateChange and onViewChange callbacks (#367, #474).
  • Added navigationAriaLive prop (#538). Thanks, @gabe-lingco!
What's changed?
  • Improved documentation on hover and onActiveStartDateChange (#458, #495).
  • Removed inline styles from Navigation component, which should make Navigation easier to style.
Bug fixes
  • Fixed hover classes applied even before the first value was selected (#505).
  • Fixed next and next2 buttons disabled if maxDate was set to the 1st millisecond of nextActiveStartDate or nextActiveStartDate2 respectively (#485, #431).

3.4.0

2 years ago
What's new?
  • Added formatDay prop which allows you to customize formatting of day numbers.
Bug fixes
  • Fixed day tile numbers not taking locale into account when formatting (#508).

3.3.1

2 years ago
Bug fixes
  • Fix crash on IE 11 caused by passing date to Date constructor (#480).
  • Fixed default min date to be 0001-01-01 local time, not UTC time.

3.3.0

2 years ago
What's new?
  • Added definite support for years < 1000 (#472).

3.2.1

2 years ago
Bug fixes
  • Fixed an issue that caused some of the v3.2.0 features and changes not to be published.

3.2.0

2 years ago
What's new?
  • Added value to onActiveStartDateChange and onViewChange callbacks arguments (#379).
  • Added event to onChange callback (#388).
  • Added inputRef prop to pass ref to main <div> rendered by <Calendar> component (#384).
What's changed?
  • Hide previous/next button when prevLabel/nextLabel is set to null (#436). Thanks, @benomatis!

3.1.0

3 years ago
What's new?
  • Added allowPartialRange which when set to true will cause onChange to be called with only partial result given selectRange prop (#351).
  • Added CSS classes to Navigation label items to allow better custom styling (#333). Thanks, @zigotica!
  • Added CSS classes to tiles to allow better styling of hovered date range (#373). Thanks, @bywo!
What's changed?
  • Refactored internals
  • Added unit tests
  • Improved documentation on hiding icons (#364). Thanks, @valtism!
Bug fixes
  • Fixed re-rendering issue in Calendar component (#300). Thanks, @UtkarshPramodGupta!

3.0.1

3 years ago
Bug fixes
  • Don't call onActiveStartDateChange, onViewChange, onChange if the values didn't change (#344).

3.0.0

3 years ago

❗️ = 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.

3.0.0-beta.6

next
3 years ago
What's new?
  • Added locale to navigationLabel arguments (#317). Thanks, @zorfling!
Bug fixes
  • Fixed activeStartDate not being called on value change (#322).
  • Fixed handling dates in year < 100: clicking e.g. January 1st, 50 would cause the calendar to jump to January 1st, 1950.

3.0.0-beta.5

3 years ago

❗️ = breaking change

What's new?
  • Exposed events in in onChange, onClick* functions (#291).
What's changed?
  • ❗️ React-Calendar no longer imports its styles by default. If you want to continue to use them, import them separately as instructed in README.

3.0.0-beta.4

3 years ago

❗️ = breaking change

What's changed?
  • ❗️ Remove renderChildren backwards compatibility (#283).
  • Refactored some elements of the package for bundle size optimizations.
Bug fixes
  • Fixed Calendar subcomponents re-rendering too often because of callback functions being merged in a suboptimal way.

3.0.0-beta.3

3 years ago
Bug fixes
  • Fixed defaultValue, defaultActiveStartDate and defaultView ignored when calculating initial active start date

3.0.0-beta.2

3 years ago
What's new?
  • tileClassName and tileContent now also get activeStartDate in arguments (#257).
What's changed?
  • formatMonthYear is now used on month tiles in YearView.
  • Reduced code duplication (#277).

3.0.0-beta

3 years ago

❗️ = 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 allows you for custom 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).
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).
  • ❗️ onActiveDateChange is now onActiveStartDateChange.
  • React-Calendar now uses @wojtekmaj/date-utils for date calculations.
Bug fixes
  • Fixed year not properly formatted in th-TH locale (#241).

2.19.2

3 years ago
Bug fixes
  • Updated Babel to 7.5.5 to fix issue with getOwnPropertyDescriptors on IE11 (#232).

2.19.1

3 years ago
What's new?
  • Documentation in README has now a separate column for default values.
What's changed?
  • Syntax optimizations to make Babel output smaller.
  • Updated Get-User-Locale. This will result in slightly smaller bundles.
  • Optimized hover performance when selectRange is turned on.
Bug fixes
  • Fixed some unit tests being parsed by Babel and added to dist.
  • Fixed TypeScript typings for onClickWeekNumber. Thanks, @JamieEgeberg!
  • Fixed typo in documentation. Thanks, @MathieuDoyon!

2.19.0

4 years ago
What's new?
  • Major rewrite of React-Calendar's subcomponents resulting in about 20% smaller code (#185).
  • Add aria-label props for navigation buttons (#189). Thanks, @anushreepatil!
Bug fixes
  • Fix color contrast ratio for month view (#188). Thanks, @anushreepatil!

2.18.1

4 years ago
Bug fixes
  • Fixed typings and documentation for formatMonth, formatMonthYear and formatShortWeekday props (#165).

2.18.0

4 years ago
What's new?
  • Weekdays bar now shows full weekday names for accessibility purposes (#151).
What's changed?
  • React-Calendar now uses Babel 7 for compilation (#124).
  • Number of internal optimizations which improves performance.
Bug fixes
  • Number of accessibility fixes (#150).
  • Fixed accessibility labels ignoring locale prop.
  • Fix rangeStart/rangeEnd class names not appearing when the day is partially covered (#153).

2.17.5

4 years ago
Bug fixes
  • Fixed an issue caused by a change in V8 JS engine which caused date ranges to be returned in reverted order in some cases (affects e.g. Chrome 70).
  • Fixed Navigation bar not updating prev/next buttons on minDate/maxDate change (#142).

2.17.4

4 years ago
Bug fixes
  • Fixed navigation label typings (#118). Thanks, @ValeriiVasin!

2.17.3

4 years ago
What's changed?
  • Updated all dependencies.
Bug fixes
  • Updated get-user-locale dependency which fixes uncaught error on IE11 caused by Array.prototype.includes not being implemented.

2.17.2

4 years ago
What's changed?
  • Improved TypeScript typings (#107). Thanks, @same31!
Bug fixes
  • Fixed PropType error that might have appeared in some cases (#106). Thanks, @same31!
  • Fixed an issue which caused activeStartDate to be occasionally missing from tileDisabled arguments (#106). Thanks, @same31!

2.17.1

4 years ago
Bug fixes
  • Fixed crash on Internet Explorer 11 (#104).

2.17.0

4 years ago
What's new?
  • More locales have Sunday-first calendar applied. See #102 for details.
  • Arabic and Hebrew calendars were added. See #102 for details.
  • showFixedNumberOfWeeks flag was added that will force React-Calendar to always show 6 weeks in order to prevent the calendar changing height (#96).
What's changed?
  • React-Calendar now uses get-user-locale to get user's locale data. This should be more reliable, especially on macOS/iOS prior to 10.2.
Bug fixes
  • Fixed react-dalendar__tile--now class not added when value was not provided (#101).
  • Fixed calendar not updating when only time was changed in value provided. As a result of this bug, React-Calendar failed to switch between partial/full date highlight.

2.17.0-beta

4 years ago
What's new?
  • More locales have Sunday-first calendar applied. See #102 for details.
  • Arabic and Hebrew calendars were added. See #102 for details.
  • showFixedNumberOfWeeks flag was added that will force React-Calendar to always show 6 weeks in order to prevent the calendar changing height (#96).
Bug fixes
  • Fixed react-dalendar__tile--now class not added when value was not provided (#101).

2.16.1

4 years ago

Largely a maintenance update. All dependencies have been updated and new Airbnb ESLint rules have been enforced.

Bug fixes
  • Fixed a bug that caused Navigation component to keep month name in old locale until the navigation occurred, when locale has changed.

2.16.0

4 years ago
What's new?
  • Selected days will now get additional CSS classes, --rangeStart, --rangeEnd and --rangeBothEnds, depending on if they are at the beginning, end, or both beginning and end of a selection (#83, #84). Thanks, @ritz078!
Bug fixes
  • Fixed typings not allowing null for prev2Label and next2Label (#74). Thanks, @fhessenberger!

2.15.2

4 years ago

Updated react-lifecycles-compat to the newest version. There are no user- or developer-facing changes (#81). Thanks, @kuzyk!


2.15.1

5 years ago

Emergency update to fix common issues that were caused by breaking changes introduced in React 16.4.0.

Bug fixes
  • Fixed Calendar's navigation, setting range and view broken or semi-broken on React 16.4+.

2.15.0

5 years ago
What's new?
  • Added navigationLabel prop which makes you able to change the label displayed on the navigation bar. See more details in README.md. Thanks, @bjenkins24!
  • You can now disable "«" & "»" buttons by setting explicitly prev2Label and next2Label respectively to null.
  • TypeScript type definitions are now also provided for entry.nostyle variant. Thanks, @szdc!
  • Added reliability improvements in cases where array of values in which one or more value is invalid is provided.
Bug fixes
  • Minor fixes to documentation. Thanks, @saitodisse!
  • Fixed builds created from macOS X having unnecessary files added to the build. Thanks, @krzysiek1507!

2.14.0

5 years ago
What's new?
  • React-Calendar is now fully compatible with React 17 (sic!). Minimum version requirement remained unchanged.
  • Tiles representing current time, now have additional class react-calendar__tile--now to help you with the styling. Thanks, @bjenkins24!

2.13.5

5 years ago
Bug fixes
  • Fixed compatibility issues that might have appeared on Internet Explorer and Safari (#45).

2.13.4

5 years ago
Bug fixes
  • Fixed a configuration bug that could have caused React-Calendar to behave unexpectedly on React 15.x environments (#37).

2.13.2

5 years ago
Bug fixes
  • Fixed an issue when navigating to previous/next month failed to keep focus on previously focused tile, if they appeared on both views (#39).
  • Fixed compatibility issues that might have appeared on Internet Explorer (#42).

2.13.1

5 years ago
Bug fixes
  • Fixed TypeError: Object doesn't support property or method 'isNaN'. error that might have appeared on Internet Explorer 11 in some cases (#40).

2.13.0

5 years ago
What's new?
  • Added tileDisabled prop that enables you to block specific days from being clickable. Thanks, @jwd2a!
Bug fixes
  • Fixed an edge case when rendering two calendars in different locales would cause the second calendar to overwrite locale settings of the first one.

2.12.0

5 years ago
What's new?
  • Major code refactoring for easier testing, less bugs and less maintenance. Yay!
Bug fixes
  • Fixed an issue when selecting a date from neighboring month wouldn't navigate to said month (#31).
  • Fix Warning: Failed prop type: text appearing twice in custom PropTypes warning messages.

2.11.2

5 years ago
Bug fixes
  • Fixed an edge case when selecting the same date twice while applying transforms to React-Calendar's result (e.g. expanding selection to a whole week) would result in React-Calendar failing to apply said transform the second time (#29).

2.11.1

5 years ago
Bug fixes
  • Fixed ReferenceError being thrown when using Server-Side Rendering (#28).

2.11.0

5 years ago
What's new?
  • You can now pass custom date formatters for month, month & year and weekday name using formatMonth, formatMonthYear and formatShortWeekday props respectively. Thanks, @spoldman!

2.10.0

5 years ago
What's new?
  • Ability to select range. You can enable range selection mode by using selectRange prop.
  • When passed a date range as a value, days can now be partially highlighted just like months, years and decades can. Behavior when passed a single date remains unchanged and won't cause day to be partially highlighted.
  • Internal layout changes. They should not cause issues with custom styling, although in some extreme cases minor adjustments may be necessary.
  • Several performance and size optimizations.
Bug fixes
  • Fixed an accessibility issue with default calendar styling in which tiles selected using keyboard were not properly highlighted.
  • Fixed uncaught error when provided (invalid) value as an array with one element.
  • Fixed uncaught error when provided tileContent function that was not an instance of Function (e.g. Jest mock function).
  • Minor accessibility fix in Test suite.

2.9.0

5 years ago
What's new?
  • Compiled files are now placed in a standard ./dist category.
  • Sample and Test suites are now using Parcel for bundling.
  • Updated development platform:
    • Updated Jest to version 22.
    • Replaced babel-preset-es2015 with babel-preset-env.

2.8.0

5 years ago
What's new
  • New callback functions - onActiveDateChange, onDrillUp and onDrillDown. All of them return an object with activeStartDate and view (#18).
  • Optimized performance by using PureComponents.
Bug fixes
  • Fixed an issue that could have caused week numbers to be shifted by one resulting in a React error (#17). Thanks, @amansur!

2.7.1

5 years ago
Bug fixes
  • Fixed type clash between React-Calendar and React-Date-Picker (#19). Thanks, @archer87pl!

2.7.0

5 years ago
What's new?
  • You can now pass dates as strings. Be careful though; while non-ISO formats may be resolved correctly, some browsers may fail to do so.
  • Minor enhancements and performance optimizations.

2.6.0

5 years ago
What's new?
  • You can now use onClickWeekNumber callback to bind events to week numbers, if shown (#12).
  • Added 27 new unit tests.
Bug fixes
  • Fixed a bug that caused YearView, DecadeView and CenturyView tiles to pass dates off by 12 hours to tileClassName/tileContent functions.

2.5.0

5 years ago
What's new?
  • You can now pass activeStartDate as a prop to Calendar, just like you could to MonthView, YearView etc. before. It will be used to determine a view to display when no value is given. When not provided, React-Calendar will display today's date by default like before (#13).
Bug fixes
  • Fixed an invalid React prop type warning when tileClassName provided was a function.

2.4.0

5 years ago
What's new?
  • More control over what's displayed in calendar tiles. Use tileContent to provide custom content to the tiles - statically or dynamically. Use tileClassName to apply custom class name to the tiles, also statically or dynamically. See README.md for more details (#9).
What's changed?
  • renderChildren was replaced with much more powerful tileContent. In tileContent, you're no longer limited to passing content by using a function, you can also use a React element or a string. renderChildren will automatically be mapped to tileContent til the next major version.

2.3.1

5 years ago
What's new?
  • Dates in <time>'s datetime attribute are now local (ISO 8601 compilant) dates, while previously we were using UTC. This makes the dates much more understandable.
    • For example, a tile with the first day of January 2017 is now marked as 2017-01-01T00:00:00.000 while previously it could be 2016-12-31T23:00:00.000Z if you were in UTC+1 timezone.

2.3.0

5 years ago
What's new?
  • Added TypeScript definitions. Thanks, @third774!
  • Added more classes for easier styling. Now "previous", "next", "previous 2" and "next 2" buttons all have distinct classes.
Bug fixes
  • Fixed minor accessibility issues.
  • Fixed Calendar saving chosen date in its state for no reason.

2.2.1

5 years ago
Bug fixes
  • Workaround for an issue in Chrome and Firefox returning wrong date names for some historical dates (#6). Thanks, @jtwhittington!

2.2.0

5 years ago
What's new?
  • You can now pass custom className that will be added along with "react-calendar" to the main React-Calendar <div> element. Accepted formats? Pretty much anything.

2.1.0

5 years ago
What's new?
  • Styles are now added automatically. You no longer need to import them manually. If you wish to style React-Calendar from the ground up, it's still possible by using /build/entry.nostyle entry file.
  • Precompiled CSS files are now added to the package.
Bug fixes
  • Fixed calendar overflowing on very small screens like iPhone 5.

2.0.4

5 years ago
What's new?
  • Updated sample and test suites to use React 16.0.0.
  • Updated unit tests to Enzyme 3.0.0.

2.0.3

5 years ago
What's new?
  • Increased unit tests coverage.
Bug fixes
  • Fix week numbers not properly calculated in some edge cases.
  • Fix onChange allowing dates smaller than minDate in some cases.

2.0.2

5 years ago
What's new?
  • Cleaned up dependencies to ensure small build size.
Bug fixes
  • Fixed minor issue with calendar sizing in test suite.

2.0.1

5 years ago

2.0.0

5 years ago
What's new?
  • React-Calendar is now on npm and yarn! As react-calendar was previously used by another library, to avoid confusion, versioning had to be aligned with preexisting npm package.
  • You can now show and hide navigation in Calendar component be using showNavigation flag.
  • You can now render additional content in calendar items (day on month view, month on year view and so on) by using renderContent prop.
Bug fixes
  • Fixed layout behaving unexpectedly when items were given a fixed size.

1.1.0

7 years ago
What's new?
  • Increased compatibility of development builds with Internet Explorer 11 and other legacy browsers.
  • Optimized npm package. It no longer includes files not necessary for end user.
What's improved?
  • Minor performance improvements.

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago
What's new?
  • Enhanced props checking.
    • React will now warn you if you pass view prop that is outside of bonduaries set by minDetail and maxDetail props.
  • Extended unit tests to include all functions and React components, raising up the coverage over 95%.
  • Removed unnecessary functions and simplified overall logic.
Bug fixes
  • Fixed getWeekNumber occasionally returning 0 instead of 52.

0.4.0

8 years ago

0.3.0

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago

75 Versions

TagPublished
4.0.0latest1mo ago
3.9.03mos ago
3.8.03mos ago
3.7.010mos ago
3.6.01yr ago
3.5.01yr ago
3.4.02yrs ago
3.3.12yrs ago
3.3.02yrs ago
3.2.12yrs ago
3.2.02yrs ago
3.1.03yrs ago
3.0.13yrs ago
3.0.03yrs ago
3.0.0-beta.6next3yrs ago
3.0.0-beta.53yrs ago
3.0.0-beta.43yrs ago
3.0.0-beta.33yrs ago
3.0.0-beta.23yrs ago
3.0.0-beta3yrs ago
2.19.23yrs ago
2.19.13yrs ago
2.19.04yrs ago
2.18.14yrs ago
2.18.04yrs ago
2.17.54yrs ago
2.17.44yrs ago
2.17.34yrs ago
2.17.24yrs ago
2.17.14yrs ago
2.17.04yrs ago
2.17.0-beta4yrs ago
2.16.14yrs ago
2.16.04yrs ago
2.15.24yrs ago
2.15.15yrs ago
2.15.05yrs ago
2.14.05yrs ago
2.13.55yrs ago
2.13.45yrs ago
2.13.25yrs ago
2.13.15yrs ago
2.13.05yrs ago
2.12.05yrs ago
2.11.25yrs ago
2.11.15yrs ago
2.11.05yrs ago
2.10.05yrs ago
2.9.05yrs ago
2.8.05yrs ago
2.7.15yrs ago
2.7.05yrs ago
2.6.05yrs ago
2.5.05yrs ago
2.4.05yrs ago
2.3.15yrs ago
2.3.05yrs ago
2.2.15yrs ago
2.2.05yrs ago
2.1.05yrs ago
2.0.45yrs ago
2.0.35yrs ago
2.0.25yrs ago
2.0.15yrs ago
2.0.05yrs ago
1.1.07yrs ago
1.0.47yrs ago
1.0.37yrs ago
1.0.27yrs ago
1.0.17yrs ago
1.0.07yrs ago
0.4.08yrs ago
0.3.08yrs ago
0.2.08yrs ago
0.1.08yrs ago