🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

react-calendar

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
r

react-calendar

Ultimate calendar for your React app.

5.1.0
latest
100

Supply Chain Security

100

Vulnerability

100

Quality

81

Maintenance

100

License

Version published
Weekly downloads
675K
-18.88%
Maintainers
3
Weekly downloads
 
Created
Issues
42

What is react-calendar?

react-calendar is a flexible and customizable calendar component for React applications. It allows developers to easily integrate a calendar into their projects, providing functionalities such as date selection, navigation between months and years, and customization of calendar appearance.

What are react-calendar's main functionalities?

Basic Calendar

This is the most basic usage of the react-calendar package, rendering a simple calendar component.

<Calendar />

Date Selection

Allows users to select a date. The selected date is managed via state in the parent component.

<Calendar onChange={setDate} value={date} />

Range Selection

Enables users to select a range of dates. The selected range is managed via state in the parent component.

<Calendar selectRange={true} onChange={setDateRange} value={dateRange} />

Custom Tile Content

Allows customization of the content of each tile in the calendar. In this example, a 'Special' label is added to Sundays.

<Calendar tileContent={({ date, view }) => view === 'month' && date.getDay() === 0 ? <p>Special</p> : null} />

Navigation Between Views

Allows setting the default view of the calendar to 'year', 'month', 'decade', or 'century'.

<Calendar defaultView='year' />

Other packages similar to react-calendar

FAQs

Package last updated on 23 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts