Skip to components
DEVELOPER REFERENCE · v4.0.0

DatePicker API

Props, callbacks and methods. Select an underlined type to explore its fields, allowed values and callback arguments.

DatePicker52 props3 callbacks0 methods

Props52

DatePicker props
NameTypeDescription
valueOptional
ISODateString | undefinedInspect type
Value to display or edit. The declared type identifies the supported representation; change callbacks describe how edited values are emitted.
labelRequiredstringLabel content or accessible name for the component, as rendered by this control.
openLabelRequiredstringAccessible label for the action that opens the picker.
disabledOptionalboolean | undefinedDisables user interaction with the control.
readOnlyOptionalboolean | undefinedDisplays the current value while preventing user edits.
classNameOptionalstring | undefinedAdditional CSS classes applied to the component root.
dirOptional"rtl" | "ltr" | undefinedText direction used by the calendar layout.
translationsOptional
Partial<CalendarTranslations> | undefinedInspect type
Overrides any subset of the exported English calendar translations.
localeOptionalstring | undefinedLocale identifier or localized label configuration used for formatting and accessible text.
previewInvalidOptionalboolean | undefinedMarks the current preview as unavailable without changing selection.
previewDescriptionOptionalstring | undefinedLocalized explanation, announced politely and linked to invalid preview days.
presetsOptional
readonly { readonly label: string; readonly date: ISODateString; }[] | undefinedInspect type
Predefined labeled date selections offered as quick actions.
referenceDateOptional
ISODateString | undefinedInspect type
Reference ISO date used for Today and relative calendar presentation.
calendarSystemOptional
DisplayCalendarSystem | undefinedInspect type
Calendar system used for display; stored values retain the ISO date representation.
numberOfMonthsOptionalnumber | undefinedNumber of months displayed simultaneously.
pagedNavigationOptionalboolean | undefinedMoves by the number of visible months instead of by a single month.
reverseMonthsOptionalboolean | undefinedDisplays simultaneous months in reverse order.
captionLayoutOptional"label" | "dropdown" | "dropdown-months" | "dropdown-years" | undefinedChooses a text caption or month/year selection dropdowns.
startMonthOptional
ISODateString | undefinedInspect type
Navigation bounds; unlike minDate/maxDate these do not disable day values.
endMonthOptional
ISODateString | undefinedInspect type
Latest month available through navigation; this does not disable individual date values.
disableNavigationOptionalboolean | undefinedDisables navigation between calendar months or years.
showWeekNumberOptionalboolean | undefinedDisplays the week-number column.
weekNumberingOptional"iso" | "local" | undefinedUses ISO week numbers or locale-based week numbering.
formatWeekNumberOptional
((week: number) => string) | undefinedInspect type
Formats a numeric week number for display.
footerOptional
ComponentChildrenInspect type
Content rendered in the footer or after the main component content.
cellSizeOptionalnumber | undefinedSize of calendar day cells in pixels.
referenceInstantOptional
Date | undefinedInspect type
Optional instant used only to resolve Today in the requested zone. ISO date values never shift.
timeZoneOptionalstring | undefinedTime zone used for resolving Today; ISO date values themselves do not shift zones.
weekStartsOnOptional
CalendarWeekStart | undefinedInspect type
First weekday of the week, from 0 (Sunday) through 6 (Saturday).
minDateOptional
ISODateString | undefinedInspect type
Earliest selectable calendar date in the library ISO date representation.
maxDateOptional
ISODateString | undefinedInspect type
Latest selectable calendar date in the library ISO date representation.
isDateDisabledOptional
((date: ISODateString) => boolean) | undefinedInspect type
Return true to prevent selection of the supplied ISO date.
showOutsideDaysOptionalboolean | undefinedRenders dates belonging to adjacent months in the current month grid.
allowOutsideMonthSelectionOptionalboolean | undefinedAllows selecting visible dates from adjacent months.
fixedWeeksOptionalboolean | undefinedKeeps a fixed six-week layout for every month.
showTodayButtonOptionalboolean | undefinedShows the action for selecting or navigating to Today.
showHeaderOptionalboolean | undefinedHides the complete month/year heading and navigation row.
showNavigationOptionalboolean | undefinedConvenience switch for both previous and next actions.
showPreviousButtonOptionalboolean | undefinedShows the previous-period navigation action.
showNextButtonOptionalboolean | undefinedShows the next-period navigation action.
showMonthLabelOptionalboolean | undefinedDisplays the current month caption.
showWeekdaysOptionalboolean | undefinedDisplays weekday column labels.
enableYearViewOptionalboolean | undefinedAllows the month/year heading to open a twelve-month overview. Defaults to true.
viewsOptional
readonly CalendarView[] | undefinedInspect type
Available views. Defaults to month and year; supersedes `enableYearView`.
defaultViewOptional
CalendarView | undefinedInspect type
Initial calendar view, month or year.
isMonthDisabledOptional
((month: ISODateString) => boolean) | undefinedInspect type
Return true to prevent selection of the supplied month.
dayClassNameOptional
string | ((date: ISODateString, context: CalendarDayContext) => string | undefined) | undefinedInspect type
Additional day-cell classes, optionally computed from the date and day state.
renderDayOptional
((date: ISODateString, context: CalendarDayContext) => ComponentChildren) | undefinedInspect type
Custom content renderer for a day, receiving its ISO date and selected/disabled/preview state.
formatMonthOptional
((month: ISODateString, locale: string) => string) | undefinedInspect type
Formats the month caption for the supplied locale.
formatWeekdayOptional
((date: ISODateString, locale: string) => string) | undefinedInspect type
Formats the weekday column label for the supplied date and locale.
formatDayLabelOptional
((date: ISODateString, locale: string) => string) | undefinedInspect type
Formats the accessible name for a calendar day.
validateSelectionOptional
((date: ISODateString, context: CalendarSelectionValidationContext) => CalendarSelectionValidationResult) | undefinedInspect type
Validates a proposed selection. Return false or an explanatory string to reject it.

Events and callbacks3

DatePicker events and callbacks
NameTypeDescription
onChangeRequired
(value?: ISODateString) => voidInspect type
Receives the new value when the user changes the control. Update the corresponding value prop for controlled use.
onInvalidSelectionOptional
((reason: string, date: ISODateString) => void) | undefinedInspect type
Receives the rejection reason and the attempted date when selection validation fails.
onViewChangeOptional
((view: CalendarView) => void) | undefinedInspect type
Receives the newly selected calendar view.

Methods0

No component-specific imperative methods. Use props and callbacks to control this component.