Skip to Content
DocumentationDate Picker

Date Picker

A date picker component with range and presets.

Examples

Default

Floating Label

Small (size)

Small size with helper text

Pick a date from the calendar

Small size states (helper, disabled, invalid)

Optional field
Field is disabled
This field is required

With min/max

With Custom Year Range

Without Year Selector

With helper text

Pick a date from the calendar

With floating label and helper text

Pick a date from the calendar

Disabled

Field is disabled

Invalid (error)

This field is required

Date Range Picker

Date Range Picker small (size)

Date Range Picker small with helper text

Select the desired date range

Date Range Picker small states (disabled, invalid)

Field is disabled
This field is required

Date Range Picker with helper text

Select the desired date range

Date Range Picker disabled

Field is disabled

Date Range Picker invalid (error)

This field is required

API

DatePicker

PropertyTypeDefaultDescription
valueDate | null-Controlled selected value.
defaultValueDate | nullnullUncontrolled initial value.
onValueChange(value: Date | null) => void-Called when the user picks/clears a date.
min / maxDate-Disables dates outside the bounds.
placeholderstring”Pick a date”Text shown when no date is selected.
format(date: Date) => string-Custom date formatting function.
disabledbooleanfalseDisables the date picker.
classNamestring-Additional CSS classes for the container.
yearRange{ start: number; end: number }{ start: 1900, end: 2100 }Range of years to display in the year selector.
showYearSelectorbooleantrueWhether to show the year selector dropdown. When false, the year is displayed as static text instead of a dropdown.
invalidbooleanfalseWhen true, applies error state styling to the trigger and DatePickerText.
size”lg” | “md""lg”Trigger size. “md” renders a compact variant matching Input size=“md”.

DateRangePicker

PropertyTypeDefaultDescription
value{ start: Date | null; end: Date | null } | null-Controlled selected range value.
defaultValue{ start: Date | null; end: Date | null } | nullnullUncontrolled initial range value.
onValueChange(value: { start: Date | null; end: Date | null } | null) => void-Called when the user picks/clears a date range.
min / maxDate-Disables dates outside the bounds.
placeholderstring”Select date range”Text shown when no range is selected.
format(date: Date) => string-Custom date formatting function.
disabledbooleanfalseDisables the date range picker.
yearRange{ start: number; end: number }{ start: 1900, end: 2100 }Range of years to display in the year selector.
showYearSelectorbooleantrueWhether to show the year selector dropdown. When false, the year is displayed as static text instead of a dropdown.
invalidbooleanfalseWhen true, applies error state styling to the trigger and DatePickerText.
size”lg” | “md""lg”Trigger size. “md” renders a compact variant matching Input size=“md”.

DatePickerText

Helper text displayed below the date picker trigger. Styled as error text when the parent DatePicker or DateRangePicker has invalid={true}.

PropertyTypeDescription
childrenReact.ReactNodeHelper or error message. Use as child of DatePicker or DateRangePicker.
classNamestringAdditional CSS classes.

DatePickerWrapper

PropertyTypeDescription
classNamestringAdditional CSS classes for the wrapper.
childrenReact.ReactNodeChild components (typically Label/DatePickerLabel and DatePicker).

DatePickerLabel

PropertyTypeDescription
htmlForstringAssociates the label with a DatePicker id.
classNamestringAdditional CSS classes for the label.
childrenReact.ReactNodeLabel text.
Last updated on