Form Inputs

Date Picker

A date picker allows a user to select a date from a popup calendar.

A date picker allows a user to select a date from a popup calendar.

Default value#

Format options#

Dates are formatted with Intl.DateTimeFormat using the locale and formatOptions props.

Disabled#

Controlled#

Component props#

NameTypeDescription
labelstringLabel text displayed above the picker
valueDateControlled date value
defaultValueDateDefault date value
minValueDateMinimum selectable date
maxValueDateMaximum selectable date
placeholderstringText shown when no date is selected (default: "Select date")
localestringLocale used to format the displayed date
formatOptionsIntl.DateTimeFormatOptionsDate format options (default: { dateStyle: "medium" })
isDisabledbooleanDisables the picker
isReadOnlybooleanPrevents changing the value
isOpenbooleanControlled open state of the popover
defaultOpenbooleanDefault open state of the popover
onOpenChange(open: boolean) => voidCalled when the popover opens or closes
onChange(date: Date | undefined) => voidCalled when a date is selected. Receives undefined when the date is cleared.
triggerPropsButtonHTMLAttributesProps passed to the trigger element (buttonProps is a deprecated alias)
calendarPropsPartial<CalendarProps>Props passed to the popup calendar