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.
Examples
Section titled “Examples”Default
Section titled “Default”Choose Due date
Previous month
Next month
Su
Mo
Tu
We
Th
Fr
Sa
Close popover
<DateInput {...args} onChange={setValue} value={value} />Placeholder
Section titled “Placeholder”Choose Due date
Previous month
Next month
Su
Mo
Tu
We
Th
Fr
Sa
Close popover
<DateInput {...args} onChange={setValue} value={value} />With Constraints
Section titled “With Constraints”Choose Due date
Previous month
Next month
Su
Mo
Tu
We
Th
Fr
Sa
Close popover
Clear Due date
<DateInput {...args} max={plainDateCreate(2026, 5, 28)} min={plainDateCreate(2026, 5, 10)} onChange={setValue} value={value}/>Disabled
Section titled “Disabled”Choose Due date
Previous month
Next month
Su
Mo
Tu
We
Th
Fr
Sa
Close popover
<DateInput {...args} onChange={() => {}} value={plainDateCreate(2026, 5, 21)}/>Loading
Section titled “Loading”Choose Due date
Previous month
Next month
Su
Mo
Tu
We
Th
Fr
Sa
Close popover
<DateInput {...args} onChange={() => {}} value={plainDateCreate(2026, 5, 21)}/>With Description
Section titled “With Description”Choose the date this task is due.May 2026
Choose Due date
Previous month
Next month
Su
Mo
Tu
We
Th
Fr
Sa
Close popover
<DateInput {...args} onChange={setValue} value={value} />Required
Section titled “Required”Choose Due date
Previous month
Next month
Su
Mo
Tu
We
Th
Fr
Sa
Close popover
<DateInput {...args} onChange={setValue} value={value} />Optional
Section titled “Optional”Choose Due date
Previous month
Next month
Su
Mo
Tu
We
Th
Fr
Sa
Close popover
<DateInput {...args} onChange={setValue} value={value} />Hidden Label
Section titled “Hidden Label”Choose Due date
Previous month
Next month
Su
Mo
Tu
We
Th
Fr
Sa
Close popover
<DateInput {...args} onChange={setValue} value={value} />Error Status
Section titled “Error Status”Choose Due date
Previous month
Next month
Su
Mo
Tu
We
Th
Fr
Sa
Close popover
Date is required
<DateInput {...args} onChange={setValue} value={value} />Warning Status
Section titled “Warning Status”Choose Due date
Previous month
Next month
Su
Mo
Tu
We
Th
Fr
Sa
Close popover
Date is in the past
<DateInput {...args} onChange={setValue} value={value} />Success Status
Section titled “Success Status”Choose Due date
Previous month
Next month
Su
Mo
Tu
We
Th
Fr
Sa
Close popover
Date is available
<DateInput {...args} onChange={setValue} value={value} />Choose Small
Previous month
Next month
Su
Mo
Tu
We
Th
Fr
Sa
Close popover
Choose Medium
Previous month
Next month
Su
Mo
Tu
We
Th
Fr
Sa
Close popover
Choose Large
Previous month
Next month
Su
Mo
Tu
We
Th
Fr
Sa
Close popover
<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>With Label Tooltip
Section titled “With Label Tooltip”Choose Due date
Previous month
Next month
Su
Mo
Tu
We
Th
Fr
Sa
Close popover
<DateInput {...args} onChange={setValue} value={value} />DateInput
Section titled “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.
When isOptional: false, isRequired: false
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional CSS class names applied to the field root. |
data-testid | string | — | Test ID applied to the input element. |
description | ReactNode | — | Supporting text rendered below the label. |
getIsDateDisabled | (date: PlainDate) => boolean | — | Returns true for dates that should be disabled. |
hasClear | boolean | false | Whether to show a clear button when a value is selected. |
htmlId | string | — | Custom HTML id applied to the input element. |
isDisabled | boolean | false | Whether the input is disabled. |
isLabelHidden | boolean | false | Whether to visually hide the label. |
isLoading | boolean | false | Whether the input is in a loading state. |
label* | string | — | Field label text. |
labelIcon | IconComponent | — | Icon shown before the label. |
labelTooltip | ReactNode | — | Tooltip content shown next to the label. |
max | PlainDate | — | Maximum selectable date. |
min | PlainDate | — | Minimum selectable date. |
onChange* | (value: PlainDate | null) => void | — | Called when the selected date changes. |
placeholder | string | '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". |
ref | Ref<HTMLInputElement> | — | Ref forwarded to the input element. |
size | "sm" | "md" | "lg" | 'md' | Visual size of the input. |
status | InputStatus | — | Validation status displayed below the input. |
style | CSSProperties | — | Inline styles applied to the field root. |
value* | PlainDate | null | — | Currently selected date. Pass null for an empty input. |
isOptional | false | — | |
isRequired | false | — |
When isOptional: true, isRequired: false
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional CSS class names applied to the field root. |
data-testid | string | — | Test ID applied to the input element. |
description | ReactNode | — | Supporting text rendered below the label. |
getIsDateDisabled | (date: PlainDate) => boolean | — | Returns true for dates that should be disabled. |
hasClear | boolean | false | Whether to show a clear button when a value is selected. |
htmlId | string | — | Custom HTML id applied to the input element. |
isDisabled | boolean | false | Whether the input is disabled. |
isLabelHidden | boolean | false | Whether to visually hide the label. |
isLoading | boolean | false | Whether the input is in a loading state. |
label* | string | — | Field label text. |
labelIcon | IconComponent | — | Icon shown before the label. |
labelTooltip | ReactNode | — | Tooltip content shown next to the label. |
max | PlainDate | — | Maximum selectable date. |
min | PlainDate | — | Minimum selectable date. |
onChange* | (value: PlainDate | null) => void | — | Called when the selected date changes. |
placeholder | string | '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". |
ref | Ref<HTMLInputElement> | — | Ref forwarded to the input element. |
size | "sm" | "md" | "lg" | 'md' | Visual size of the input. |
status | InputStatus | — | Validation status displayed below the input. |
style | CSSProperties | — | Inline styles applied to the field root. |
value* | PlainDate | null | — | Currently selected date. Pass null for an empty input. |
isOptional* | true | — | |
isRequired | false | — |
When isOptional: false, isRequired: true
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional CSS class names applied to the field root. |
data-testid | string | — | Test ID applied to the input element. |
description | ReactNode | — | Supporting text rendered below the label. |
getIsDateDisabled | (date: PlainDate) => boolean | — | Returns true for dates that should be disabled. |
hasClear | boolean | false | Whether to show a clear button when a value is selected. |
htmlId | string | — | Custom HTML id applied to the input element. |
isDisabled | boolean | false | Whether the input is disabled. |
isLabelHidden | boolean | false | Whether to visually hide the label. |
isLoading | boolean | false | Whether the input is in a loading state. |
label* | string | — | Field label text. |
labelIcon | IconComponent | — | Icon shown before the label. |
labelTooltip | ReactNode | — | Tooltip content shown next to the label. |
max | PlainDate | — | Maximum selectable date. |
min | PlainDate | — | Minimum selectable date. |
onChange* | (value: PlainDate | null) => void | — | Called when the selected date changes. |
placeholder | string | '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". |
ref | Ref<HTMLInputElement> | — | Ref forwarded to the input element. |
size | "sm" | "md" | "lg" | 'md' | Visual size of the input. |
status | InputStatus | — | Validation status displayed below the input. |
style | CSSProperties | — | Inline styles applied to the field root. |
value* | PlainDate | null | — | Currently selected date. Pass null for an empty input. |
isOptional | false | — | |
isRequired* | true | — |