Back to components
ElementData DisplayFree

Calendar React component

An inline month calendar for picking one day, a range or several days, with event dots under their days, an agenda for the selected day, months that slide in from the side they come from, a month picker, week numbers and full keyboard control.

About the Calendar component

Calendar is a full month view that lives on the page rather than in a popover, for booking screens, schedules and dashboards. It can pick one day, a range or any set of days, slides between months with arrows, and can show colored dots for events under their days with an agenda of the selected day's events listed below the grid. Today is marked, and a Today button jumps back to the current month.

mode picks single, range or multiple, each with its own value, default and change handler (value, range or dates). month or defaultMonth with onMonthChange set the month on show. minDate, maxDate and isDateDisabled block days, weekStartsOn starts weeks on Sunday (0) or Monday (1, the default), and locale names the months and weekdays. showWeekNumbers, showOutsideDays and showTodayButton toggle those parts, and size picks sm, md or lg. Dates are handled in local time.

When to use it

Use Calendar when the calendar itself belongs on the page: booking and availability screens, a schedule next to a list of events, picking several days at once, or a dashboard widget. It shows where things are in the month at a glance.

If the date only needs to go into a form field, use Date Picker instead; it keeps the calendar in a popover until it's needed.

Installation

Add the Calendar component to your project with the shadcn CLI. It lands in components/calendar.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/calendar

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install motion clsx tailwind-merge

Related components

Basic Carousel
Free
Sparkline Stat
Free
Checklist
Free
Tag Input
Free
Empty State
Free
Kbd
Free