| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
- Add the registry
- Add calendar
Usage
Calendar is built on DayPicker. mode is "single", "multiple" or
"range". For a field that opens a calendar, use a Date Picker.
Calendar highlights today, which can differ between the server and the browser. If you render it
on the server, give it a defaultMonth that doesn't include today, or render it only in the
browser.
Examples
Range
numberOfMonths shows more than one month.
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
Multiple dates
max limits how many dates can be picked.
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
Month and year dropdowns
captionLayout="dropdown" adds month and year menus. startMonth and endMonth bound them.
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
Disabled days
disabled takes dates, ranges, { before }, { after } and { dayOfWeek } matchers, or a list
of them.
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
Week numbers
showWeekNumber adds a column of week numbers.
| Su | Mo | Tu | We | Th | Fr | Sa | |
|---|---|---|---|---|---|---|---|
23 | |||||||
24 | |||||||
25 | |||||||
26 | |||||||
27 |
Locale
Pass a locale from @daypicker/react/locale to translate it.
| lu | ma | mi | ju | vi | sá | do |
|---|---|---|---|---|---|---|
Props
Calendar takes DayPicker's props. Pass
classNames or components to override a part. Set --cell-size in className to resize the
days, as in [--cell-size:--spacing(8)].
CalendarDayButton is the day button. Wrap it in your own DayButton to add content to each day.