DatePicker API
Props, callbacks and methods. Select an underlined type to explore its fields, allowed values and callback arguments.
DatePicker52 props3 callbacks0 methods
Props52
| Name | Type | Description |
|---|---|---|
valueOptional |
| Value to display or edit. The declared type identifies the supported representation; change callbacks describe how edited values are emitted. |
labelRequired | string | Label content or accessible name for the component, as rendered by this control. |
openLabelRequired | string | Accessible label for the action that opens the picker. |
disabledOptional | boolean | undefined | Disables user interaction with the control. |
readOnlyOptional | boolean | undefined | Displays the current value while preventing user edits. |
classNameOptional | string | undefined | Additional CSS classes applied to the component root. |
dirOptional | "rtl" | "ltr" | undefined | Text direction used by the calendar layout. |
translationsOptional |
| Overrides any subset of the exported English calendar translations. |
localeOptional | string | undefined | Locale identifier or localized label configuration used for formatting and accessible text. |
previewInvalidOptional | boolean | undefined | Marks the current preview as unavailable without changing selection. |
previewDescriptionOptional | string | undefined | Localized explanation, announced politely and linked to invalid preview days. |
presetsOptional |
| Predefined labeled date selections offered as quick actions. |
referenceDateOptional |
| Reference ISO date used for Today and relative calendar presentation. |
calendarSystemOptional |
| Calendar system used for display; stored values retain the ISO date representation. |
numberOfMonthsOptional | number | undefined | Number of months displayed simultaneously. |
pagedNavigationOptional | boolean | undefined | Moves by the number of visible months instead of by a single month. |
reverseMonthsOptional | boolean | undefined | Displays simultaneous months in reverse order. |
captionLayoutOptional | "label" | "dropdown" | "dropdown-months" | "dropdown-years" | undefined | Chooses a text caption or month/year selection dropdowns. |
startMonthOptional |
| Navigation bounds; unlike minDate/maxDate these do not disable day values. |
endMonthOptional |
| Latest month available through navigation; this does not disable individual date values. |
disableNavigationOptional | boolean | undefined | Disables navigation between calendar months or years. |
showWeekNumberOptional | boolean | undefined | Displays the week-number column. |
weekNumberingOptional | "iso" | "local" | undefined | Uses ISO week numbers or locale-based week numbering. |
formatWeekNumberOptional |
| Formats a numeric week number for display. |
footerOptional |
| Content rendered in the footer or after the main component content. |
cellSizeOptional | number | undefined | Size of calendar day cells in pixels. |
referenceInstantOptional |
| Optional instant used only to resolve Today in the requested zone. ISO date values never shift. |
timeZoneOptional | string | undefined | Time zone used for resolving Today; ISO date values themselves do not shift zones. |
weekStartsOnOptional |
| First weekday of the week, from 0 (Sunday) through 6 (Saturday). |
minDateOptional |
| Earliest selectable calendar date in the library ISO date representation. |
maxDateOptional |
| Latest selectable calendar date in the library ISO date representation. |
isDateDisabledOptional |
| Return true to prevent selection of the supplied ISO date. |
showOutsideDaysOptional | boolean | undefined | Renders dates belonging to adjacent months in the current month grid. |
allowOutsideMonthSelectionOptional | boolean | undefined | Allows selecting visible dates from adjacent months. |
fixedWeeksOptional | boolean | undefined | Keeps a fixed six-week layout for every month. |
showTodayButtonOptional | boolean | undefined | Shows the action for selecting or navigating to Today. |
showHeaderOptional | boolean | undefined | Hides the complete month/year heading and navigation row. |
showNavigationOptional | boolean | undefined | Convenience switch for both previous and next actions. |
showPreviousButtonOptional | boolean | undefined | Shows the previous-period navigation action. |
showNextButtonOptional | boolean | undefined | Shows the next-period navigation action. |
showMonthLabelOptional | boolean | undefined | Displays the current month caption. |
showWeekdaysOptional | boolean | undefined | Displays weekday column labels. |
enableYearViewOptional | boolean | undefined | Allows the month/year heading to open a twelve-month overview. Defaults to true. |
viewsOptional |
| Available views. Defaults to month and year; supersedes `enableYearView`. |
defaultViewOptional |
| Initial calendar view, month or year. |
isMonthDisabledOptional |
| Return true to prevent selection of the supplied month. |
dayClassNameOptional |
| Additional day-cell classes, optionally computed from the date and day state. |
renderDayOptional |
| Custom content renderer for a day, receiving its ISO date and selected/disabled/preview state. |
formatMonthOptional |
| Formats the month caption for the supplied locale. |
formatWeekdayOptional |
| Formats the weekday column label for the supplied date and locale. |
formatDayLabelOptional |
| Formats the accessible name for a calendar day. |
validateSelectionOptional |
| Validates a proposed selection. Return false or an explanatory string to reject it. |
Events and callbacks3
| Name | Type | Description |
|---|---|---|
onChangeRequired |
| Receives the new value when the user changes the control. Update the corresponding value prop for controlled use. |
onInvalidSelectionOptional |
| Receives the rejection reason and the attempted date when selection validation fails. |
onViewChangeOptional |
| Receives the newly selected calendar view. |
Methods0
No component-specific imperative methods. Use props and callbacks to control this component.