Homecomponentsinput

Calendar

An input that displays a calendar to pick a day or days.


Use Calendar for selecting one or many days.

Aug 2024
Sun
Mon
Tue
Wed
Thu
Fri
Sat

Changing Month

By default, Calendar displays the month of the current day. Use the month and onMonthChange to control the current month.

Jun 2022
Sun
Mon
Tue
Wed
Thu
Fri
Sat

Selection

Single Selection

Use single as mode to allow single selections.

Aug 2024
Sun
Mon
Tue
Wed
Thu
Fri
Sat

Multiple Selection

Use multiple as mode to allow multiple selections.

Jun 2022
Sun
Mon
Tue
Wed
Thu
Fri
Sat

Range Selection

Use range as mode to allow selecting a range.

Jun 2022
Sun
Mon
Tue
Wed
Thu
Fri
Sat

Number of Months

Use numberOfMonths to display more months side-by-side. This property is responsive, so you could change the number of months on different breakpoints.

Jun 2022
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Jul 2022
Sun
Mon
Tue
Wed
Thu
Fri
Sat

Showing Outside Days

Use showOutsideDays to display days falling in the next or the previous month.

Aug 2024
Sun
Mon
Tue
Wed
Thu
Fri
Sat

Disabling Days

Use disabled to disable one or more days. You can give it a date, a range, or a list that contains both.

Here's how to disable multiple days.

Jun 2022
Sun
Mon
Tue
Wed
Thu
Fri
Sat

Here's how to disable a range of days.

Jun 2022
Sun
Mon
Tue
Wed
Thu
Fri
Sat

Days with Events

Use booked to indicate a day, days, or range with events.

Jun 2022
Sun
Mon
Tue
Wed
Thu
Fri
Sat

API

mode
Required
The kind of selection to allow.
range
multiple
single

onChange
Required
Action to perform when selection changes.
((selected?: Date | undefined) => void) | ((selected?: Date[] | undefined) => void) | ((selected?: DateRange | undefined) => void)

value
The selected day, days, or range.
Date | Date[] | DateRange

month
The month displayed in the calendar.
Date

onMonthChange
Event fired when the user navigates between months.
((month: Date) => void)

numberOfMonths
The number of displayed months. Defaults to 1.
ResponsiveValue<2 | 1>

showOutsideDays
Show the outside days. An outside day is a day falling in the next or the previous month. Default is false.
true
false

disabled
Disable given day, days, range, or a combination of all.
Matcher | Matcher[]

booked
Show an indicator on the given day, days, range, or a combination to indicate having events.
Matcher | Matcher[]