Calendar

A month grid for picking a date, several dates or a range of them.

June 2025

Installation

  1. Add the registryOnce per project
  2. 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.

June 2025
July 2025

Multiple dates

max limits how many dates can be picked.

June 2025

Month and year dropdowns

captionLayout="dropdown" adds month and year menus. startMonth and endMonth bound them.

March 1992

Disabled days

disabled takes dates, ranges, { before }, { after } and { dayOfWeek } matchers, or a list of them.

June 2025

Week numbers

showWeekNumber adds a column of week numbers.

June 2025
23
24
25
26
27

Locale

Pass a locale from @daypicker/react/locale to translate it.

junio 2025

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.