Skip to content

DateInput

A date picker input that combines a text input with a calendar popover. Users can type a date directly or select one from the calendar.

<DateInput {...args} onChange={setValue} value={value} />
<DateInput {...args} onChange={setValue} value={value} />
<DateInput
{...args}
max={plainDateCreate(2026, 5, 28)}
min={plainDateCreate(2026, 5, 10)}
onChange={setValue}
value={value}
/>
<DateInput
{...args}
onChange={() => {}}
value={plainDateCreate(2026, 5, 21)}
/>
<DateInput
{...args}
onChange={() => {}}
value={plainDateCreate(2026, 5, 21)}
/>
Choose the date this task is due.
<DateInput {...args} onChange={setValue} value={value} />
<DateInput {...args} onChange={setValue} value={value} />
<DateInput {...args} onChange={setValue} value={value} />
<DateInput {...args} onChange={setValue} value={value} />
<DateInput {...args} onChange={setValue} value={value} />
Date is in the past
<DateInput {...args} onChange={setValue} value={value} />
Date is available
<DateInput {...args} onChange={setValue} value={value} />
<div style={{display: 'flex', flexDirection: 'column', gap: 16}}>
<DateInput label="Small" onChange={setSm} size="sm" value={sm} />
<DateInput label="Medium" onChange={setMd} size="md" value={md} />
<DateInput label="Large" onChange={setLg} size="lg" value={lg} />
</div>
<DateInput {...args} onChange={setValue} value={value} />

A date picker input that combines a text input with a calendar popover. Users can type a date directly or select one from the calendar.

When isOptional: false, isRequired: false

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the field root.
data-testidstringTest ID applied to the input element.
descriptionReactNodeSupporting text rendered below the label.
getIsDateDisabled(date: PlainDate) => booleanReturns true for dates that should be disabled.
hasClearbooleanfalseWhether to show a clear button when a value is selected.
htmlIdstringCustom HTML id applied to the input element.
isDisabledbooleanfalseWhether the input is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
isLoadingbooleanfalseWhether the input is in a loading state.
label*stringField label text.
labelIconIconComponentIcon shown before the label.
labelTooltipReactNodeTooltip content shown next to the label.
maxPlainDateMaximum selectable date.
minPlainDateMinimum selectable date.
onChange*(value: PlainDate | null) => voidCalled when the selected date changes.
placeholderstring'e.g. May 21, 2026'Placeholder text shown when no date is selected. Typed dates accept a range of formats, including "May 21, 2026", "5/21/2026", and "2026-05-21".
refRef<HTMLInputElement>Ref forwarded to the input element.
size"sm" | "md" | "lg"'md'Visual size of the input.
statusInputStatusValidation status displayed below the input.
styleCSSPropertiesInline styles applied to the field root.
value*PlainDate | nullCurrently selected date. Pass null for an empty input.
isOptionalfalse
isRequiredfalse

When isOptional: true, isRequired: false

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the field root.
data-testidstringTest ID applied to the input element.
descriptionReactNodeSupporting text rendered below the label.
getIsDateDisabled(date: PlainDate) => booleanReturns true for dates that should be disabled.
hasClearbooleanfalseWhether to show a clear button when a value is selected.
htmlIdstringCustom HTML id applied to the input element.
isDisabledbooleanfalseWhether the input is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
isLoadingbooleanfalseWhether the input is in a loading state.
label*stringField label text.
labelIconIconComponentIcon shown before the label.
labelTooltipReactNodeTooltip content shown next to the label.
maxPlainDateMaximum selectable date.
minPlainDateMinimum selectable date.
onChange*(value: PlainDate | null) => voidCalled when the selected date changes.
placeholderstring'e.g. May 21, 2026'Placeholder text shown when no date is selected. Typed dates accept a range of formats, including "May 21, 2026", "5/21/2026", and "2026-05-21".
refRef<HTMLInputElement>Ref forwarded to the input element.
size"sm" | "md" | "lg"'md'Visual size of the input.
statusInputStatusValidation status displayed below the input.
styleCSSPropertiesInline styles applied to the field root.
value*PlainDate | nullCurrently selected date. Pass null for an empty input.
isOptional*true
isRequiredfalse

When isOptional: false, isRequired: true

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the field root.
data-testidstringTest ID applied to the input element.
descriptionReactNodeSupporting text rendered below the label.
getIsDateDisabled(date: PlainDate) => booleanReturns true for dates that should be disabled.
hasClearbooleanfalseWhether to show a clear button when a value is selected.
htmlIdstringCustom HTML id applied to the input element.
isDisabledbooleanfalseWhether the input is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
isLoadingbooleanfalseWhether the input is in a loading state.
label*stringField label text.
labelIconIconComponentIcon shown before the label.
labelTooltipReactNodeTooltip content shown next to the label.
maxPlainDateMaximum selectable date.
minPlainDateMinimum selectable date.
onChange*(value: PlainDate | null) => voidCalled when the selected date changes.
placeholderstring'e.g. May 21, 2026'Placeholder text shown when no date is selected. Typed dates accept a range of formats, including "May 21, 2026", "5/21/2026", and "2026-05-21".
refRef<HTMLInputElement>Ref forwarded to the input element.
size"sm" | "md" | "lg"'md'Visual size of the input.
statusInputStatusValidation status displayed below the input.
styleCSSPropertiesInline styles applied to the field root.
value*PlainDate | nullCurrently selected date. Pass null for an empty input.
isOptionalfalse
isRequired*true