Skip to content

DateRangeInput

A date range picker input that opens a calendar popover for selecting a start and end date.

<DateRangeInput {...args} onChange={setValue} value={value} />
<DateRangeInput {...args} onChange={setValue} value={value} />
<DateRangeInput {...args} onChange={setValue} value={value} />
<DateRangeInput
{...args}
max={plainDateCreate(2026, 5, 28)}
min={plainDateCreate(2026, 5, 5)}
onChange={setValue}
value={value}
/>
<DateRangeInput
{...args}
getIsDateDisabled={date => date.dayOfWeek === 6 || date.dayOfWeek === 7}
onChange={setValue}
value={value}
/>
<DateRangeInput {...args} onChange={() => {}} value={defaultRange} />
<DateRangeInput {...args} onChange={() => {}} value={defaultRange} />
<DateRangeInput {...args} onChange={setValue} value={value} />
Range exceeds 7 days
<DateRangeInput {...args} onChange={setValue} value={value} />
<DateRangeInput {...args} onChange={setValue} value={value} />
Select a check-in and check-out date.
<DateRangeInput {...args} onChange={setValue} value={value} />
<div style={{display: 'flex', flexDirection: 'column', gap: 16}}>
<DateRangeInput label="Small" onChange={setSm} size="sm" value={sm} />
<DateRangeInput label="Medium" onChange={setMd} size="md" value={md} />
<DateRangeInput label="Large" onChange={setLg} size="lg" value={lg} />
</div>

A date range picker input that opens a calendar popover for selecting a start and end date.

When isOptional: false, isRequired: false

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the input wrapper.
data-testidstringTest ID applied to the input element.
getIsDateDisabled(date: PlainDate) => booleanReturns true for dates that should be disabled.
descriptionReactNodeSupporting text rendered below the label.
hasClearbooleanfalseWhether to show a clear button when a value is selected.
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.
numberOfMonths1 | 22Number of calendar months shown in the popover.
onChange*(value: DateRange | null) => voidCalled when the selected date range changes.
placeholderstringPlaceholder text shown when no range is selected.
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 input wrapper.
value*DateRange | nullCurrently selected date range. Pass null for an empty input.
isOptionalfalse
isRequiredfalse

When isOptional: true, isRequired: false

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the input wrapper.
data-testidstringTest ID applied to the input element.
getIsDateDisabled(date: PlainDate) => booleanReturns true for dates that should be disabled.
descriptionReactNodeSupporting text rendered below the label.
hasClearbooleanfalseWhether to show a clear button when a value is selected.
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.
numberOfMonths1 | 22Number of calendar months shown in the popover.
onChange*(value: DateRange | null) => voidCalled when the selected date range changes.
placeholderstringPlaceholder text shown when no range is selected.
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 input wrapper.
value*DateRange | nullCurrently selected date range. Pass null for an empty input.
isOptional*true
isRequiredfalse

When isOptional: false, isRequired: true

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the input wrapper.
data-testidstringTest ID applied to the input element.
getIsDateDisabled(date: PlainDate) => booleanReturns true for dates that should be disabled.
descriptionReactNodeSupporting text rendered below the label.
hasClearbooleanfalseWhether to show a clear button when a value is selected.
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.
numberOfMonths1 | 22Number of calendar months shown in the popover.
onChange*(value: DateRange | null) => voidCalled when the selected date range changes.
placeholderstringPlaceholder text shown when no range is selected.
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 input wrapper.
value*DateRange | nullCurrently selected date range. Pass null for an empty input.
isOptionalfalse
isRequired*true