On this page:

Date picker

Neutral

Preview

index.tsx

Accent

Preview

index.tsx

Readonly

Preview

index.tsx

Disabled

Preview

index.tsx

Options

Preview

index.tsx

Preview

index.tsx

Preview

index.tsx

Preview

index.tsx
This is a required field

Floating label

Preview

index.tsx

Preview

index.tsx
This is a required field

Sizes

Preview

index.tsx

Preview

index.tsx

Controlled

With enable time

Preview

index.tsx

With select

Preview

index.tsx

Alternative

Neutral

Preview

index.tsx

Accent

Preview

index.tsx

Readonly

Preview

index.tsx

Disabled

Preview

index.tsx

Options

Preview

index.tsx

Preview

index.tsx

Preview

index.tsx

Preview

index.tsx
This is a required field

Floating label

Preview

index.tsx
This is a required field

Sizes

Preview

index.tsx

Preview

index.tsx

Design Tokens for DatePicker

TokenColor forState/Meaning
--par-color-text-datepicker-days-today-neutral-enabledDay text (today, neutral)Today, enabled (neutral)
--par-color-text-datepicker-days-today-neutral-hoveredDay text (today, neutral)Today, hovered (neutral)
--par-color-text-datepicker-days-today-neutral-activeDay text (today, neutral)Today, active (neutral)
--par-color-text-datepicker-days-today-accent-enabledDay text (today, accent)Today, enabled (accent)
--par-color-text-datepicker-days-today-accent-hoveredDay text (today, accent)Today, hovered (accent)
--par-color-text-datepicker-days-today-accent-activeDay text (today, accent)Today, active (accent)
--par-color-text-datepicker-days-normal-enabledDay text (normal)Normal, enabled
--par-color-text-datepicker-days-normal-neutral-hoveredDay text (normal, neutral)Normal, hovered (neutral)
--par-color-text-datepicker-days-normal-accent-hoveredDay text (normal, accent)Normal, hovered (accent)
--par-color-text-datepicker-days-normal-neutral-activeDay text (normal, neutral)Normal, active (neutral)
--par-color-text-datepicker-days-normal-accent-activeDay text (normal, accent)Normal, active (accent)
--par-color-text-datepicker-days-normal-disabledDay text (normal)Disabled
--par-color-text-datepicker-days-normal-drag-neutralDay text (drag, neutral)Drag selection (neutral)
--par-color-text-datepicker-days-normal-drag-accentDay text (drag, accent)Drag selection (accent)
--par-color-text-datepicker-days-today-drag-neutralDay text (today, drag, neutral)Today, drag (neutral)
--par-color-text-datepicker-days-today-drag-accentDay text (today, drag, accent)Today, drag (accent)
--par-color-text-datepicker-timeTime textTime picker text
--par-color-text-datepicker-caret-enabledCaret iconCaret enabled
--par-color-text-datepicker-caret-hoveredCaret iconCaret hovered
--par-color-text-datepicker-caret-disabledCaret iconCaret disabled
--par-color-bg-datepicker-days-neutral-enabledDay background (neutral)Enabled
--par-color-bg-datepicker-days-neutral-hoveredDay background (neutral)Hovered
--par-color-bg-datepicker-days-neutral-activeDay background (neutral)Active
--par-color-bg-datepicker-days-neutral-disabledDay background (neutral)Disabled
--par-color-bg-datepicker-days-accent-enabledDay background (accent)Enabled
--par-color-bg-datepicker-days-accent-hoveredDay background (accent)Hovered
--par-color-bg-datepicker-days-accent-activeDay background (accent)Active
--par-color-bg-datepicker-days-accent-disabledDay background (accent)Disabled
--par-color-bg-datepicker-days-drag-neutralDay background (drag, neutral)Drag selection (neutral)
--par-color-bg-datepicker-days-drag-accentDay background (drag, accent)Drag selection (accent)
--par-color-bg-datepicker-month-select-dropdown-enabledMonth select dropdownEnabled
--par-color-bg-datepicker-month-select-dropdown-hoveredMonth select dropdownHovered
--par-color-bg-datepickerDatePicker backgroundMain background
--par-color-border-datepickerDatePicker borderMain border
--par-color-border-datepicker-month-select-listMonth select list borderBorder for month select list

DatePicker API Reference

<DatePicker />

PropTypeDefaultDescription
floatingLabelReactNodeFloating label inside the input
wrapperPropsobjectProps for input container
color'neutral' | 'accent''neutral'Theme color
iconReactNodeIcon inside the input
sideIcon'left' | 'right''right'Position of secondary icon
localestring'default'Locale for the DatePicker
calenderHeaderReactNodeCustom component at top of calendar
optionsobjectFlatpickr options (see Flatpickr docs)
onFocusfunction (event)Callback on input focus
onBlurfunction (event)Callback on input blur
onInputChangefunction (event, flatPickrInstance)Callback on input change (allowInput = true)
isErrorbooleanfalseError state
errorMessagestringError message
themestring'default'Theme
inputSize'sm' | 'md''md'Input size
...InputPropsSee InputInherits all props from Input
...FlatpickrPropsSee FlatpickrInherits all Flatpickr options

Note: DatePicker inherits all props from Input and Flatpickr. See Input documentation and Flatpickr options for full details.