Skip to main content

API v9.1.4

DayPicker​

Function, Type alias, InterfaceDescription
DayPickerRender the date picker calendar.
DayPickerPropsThe props for the <DayPicker /> component.
PropsBaseProps for customizing the calendar, handling localization, and managing events. These exclude the selection mode props.

Classes​

ClassDescription
CalendarDayRepresent the day displayed in the calendar.
CalendarMonthRepresent a month in a calendar year. Contains the weeks within the month.
CalendarWeekRepresent a week in a calendar month.

Components​

FunctionDescription
CaptionLabelRender the label in the month caption.
ChevronRender the chevron icon used in the navigation buttons and dropdowns.
DayRender the gridcell of a day in the calendar and handle the interaction and the focus with they day.
DayButtonRender the button for a day in the calendar.
DropdownRender a dropdown component to use in the navigation bar.
DropdownNavRender the the navigation dropdowns.
FooterComponent wrapping the footer.
MonthRender the grid with the weekday header row and the weeks for the given month.
MonthCaptionRender the caption of a month in the calendar.
MonthGridRender the grid of days in a month.
MonthsComponent wrapping the month grids.
MonthsDropdownRender the dropdown to navigate between months.
NavRender the toolbar with the navigation button.
NextMonthButtonRender the next month button element in the calendar.
OptionRender the option element.
PreviousMonthButtonRender the previous month button element in the calendar.
RootRender the root element.
SelectRender the select element.
WeekRender a row in the calendar, with the days and the week number.
WeekdayRender the column header with the weekday name (e.g. "Mo", "Tu", etc.).
WeekdaysRender the row with the weekday names.
WeekNumberRender the cell with the number of the week.
WeekNumberHeaderRender the column header for the week numbers.
WeeksRender the weeks in the month grid.
YearsDropdownRender the dropdown to navigate between years.

Formatters​

FunctionDescription
formatCaptionFormat the caption of the month.
formatDayFormat the day date shown in the day cell.
formatMonthDropdownFormat the month number for the dropdown option label.
formatWeekdayNameFormat the weekday name to be displayed in the weekdays header.
formatWeekNumberFormat the week number.
formatWeekNumberHeaderFormat the week number header.
formatYearDropdownFormat the years for the dropdown option label.

Labels​

FunctionDescription
labelDay-
labelDayButtonThe ARIA label for the day button.
labelGridReturn an ARIA label for the month grid, that will be announced when entering the grid.
labelGridcellThe label for the day gridcell when the calendar is not interactive.
labelMonthDropdownThe ARIA label for the months dropdown.
labelNavThe ARIA label for the navigation toolbar.
labelNextThe ARIA label for next month button.
labelPreviousThe ARIA label for previous month button.
labelWeekdayThe ARIA label for the Weekday column header.
labelWeekNumberThe ARIA label for the week number cell (the first cell in the row).
labelWeekNumberHeaderThe ARIA label for the week number header element.
labelYearDropdownThe ARIA label for the years dropdown.

Utilities​

FunctionDescription
addToRangeAdd a day to an existing range.
dateMatchModifiersReturns whether a day matches against at least one of the given Matcher.
getDefaultClassNamesGet the default class names for the UI elements.
isDateAfterTypeReturns true if value is of type DateAfter.
isDateBeforeTypeReturns true if value is of type DateBefore.
isDateIntervalReturns true if matcher is of type DateInterval.
isDateRangeReturns true if value is a DateRange type.
isDayOfWeekTypeReturns true if value is a DayOfWeek type.
rangeIncludesDateDetermines whether a given date is inside a specified date range.

Hooks​

FunctionDescription
useDayPickerReturns the context to work with <DayPicker /> inside custom components.

Enumerations​

EnumerationDescription
DayFlagThe flags for the UI.Day.
SelectionStateThe state that can be applied to the UI.Day element when in selection mode.
UIThe UI elements composing DayPicker. These elements are mapped to CustomComponents, the ClassNames and the Styles used by DayPicker.

Interfaces​

InterfaceDescription
PropsMultiThe props when the multiple selection is optional.
PropsMultiRequiredThe props when the multiple selection is required.
PropsRangeThe props when the range selection is optional.
PropsRangeRequiredThe props when the range selection is required.
PropsSingleThe props when the single selection is optional.
PropsSingleRequiredThe props when the single selection is required.

Type Aliases​

Type aliasDescription
ButtonProps-
CaptionLabelProps-
ChevronProps-
ClassNamesThe CSS classnames to use for the UI elements, the SelectionState and the DayFlag.
CustomComponentsThe components that can be changed using the components prop.
DateAfterMatch a day falling after the specified date, with the date not included.
DateBeforeMatch a day falling before the specified date, with the date not included.
DateIntervalAn interval of dates. Differently from DateRange, the range ends here are not included.
DateLibThe date library used by DayPicker. It's a subset of the date-fns functions plus an optional Date constructor.
DateRangeA range of dates. The range can be open. Differently from DateInterval, the range ends here are included.
DayButtonProps-
DayEventHandlerThe event handler triggered when clicking or interacting with a day.
DayOfWeekMatch dates being one of the specified days of the week (0-6, where 0 is Sunday).
DayPickerContextRepresents the context for the DayPicker component, providing various properties and methods to interact with the calendar.
DayProps-
DeprecatedUIDeprecated UI elements and flags.
DropdownNavProps-
DropdownOptionAn option to use in the dropdown. Maps to the <option> HTML element.
DropdownProps-
FooterProps-
FormatOptionsThe options for the Formatters.
FormattersRepresent a map of formatters used to render localized content.
LabelOptionsThe options for the Labels.
LabelsMap of functions to translate ARIA labels for the relative elements.
LocaleThe locale used within DayPicker.
MatcherA value or a function that matches a specific day.
ModeSelection modes supported by DayPicker.
ModifiersRepresents the modifiers that match a specific day in the calendar.
ModifiersClassNamesThe classnames to assign to each day element matching a modifier.
ModifiersStylesThe style to apply to each day element matching a modifier.
MonthCaptionProps-
MonthChangeEventHandlerThe event handler when a month is changed in the calendar.
MonthGridProps-
MonthProps-
MonthsProps-
MoveFocusByThe temporal unit to move the focus by.
MoveFocusDirThe direction to move the focus relative to the current focused date.
NavProps-
NextMonthButtonProps-
OnSelectHandlerShared handler type for onSelect callback when a selection mode is set.
OptionProps-
PreviousMonthButtonProps-
RootProps-
SelectedMulti-
SelectedRange-
SelectedSingle-
SelectedValue-
SelectHandler-
SelectHandlerMulti-
SelectHandlerRange-
SelectHandlerSingle-
Selection-
SelectProps-
StylesThe CSS styles to use for the UI elements, the SelectionState and the DayFlag.
WeekdayProps-
WeekdaysProps-
WeekNumberHeaderProps-
WeekNumberProps-
WeekProps-
WeeksProps-