Skip to content

DateRangeInput

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

(args: DateRangeInputProps) => {
const [value, setValue] = useState<DateRange | null>(() => defaultRange);
return <DateRangeInput {...args} onChange={setValue} value={value} />;
}
(args: DateRangeInputProps) => {
const [value, setValue] = useState<DateRange | null>(() => defaultRange);
return <DateRangeInput {...args} onChange={setValue} value={value} />;
}
(args: DateRangeInputProps) => {
const [value, setValue] = useState<DateRange | null>(() => singleDateRange);
return <DateRangeInput {...args} onChange={setValue} value={value} />;
}
(args: DateRangeInputProps) => {
const [value, setValue] = useState<DateRange | null>(null);
return <DateRangeInput {...args} onChange={setValue} value={value} />;
}
(args: DateRangeInputProps) => {
const [value, setValue] = useState<DateRange | null>(() => defaultRange);
return <DateRangeInput {...args} onChange={setValue} value={value} />;
}
(args: DateRangeInputProps) => {
const [value, setValue] = useState<DateRange | null>(() => defaultRange);
return (
<DateRangeInput
{...args}
max={plainDateCreate(2026, 5, 28)}
min={plainDateCreate(2026, 5, 5)}
onChange={setValue}
value={value}
/>
);
}
Select a range of up to 14 days.
(args: DateRangeInputProps) => {
const [value, setValue] = useState<DateRange | null>(() => defaultRange);
return <DateRangeInput {...args} onChange={setValue} value={value} />;
}
(args: DateRangeInputProps) => {
const [value, setValue] = useState<DateRange | null>(() => defaultRange);
return (
<DateRangeInput
{...args}
getIsDateDisabled={date => date.dayOfWeek === 6 || date.dayOfWeek === 7}
onChange={setValue}
value={value}
/>
);
}
<DateRangeInput {...args} onChange={() => {}} value={defaultRange} />
<DateRangeInput {...args} onChange={() => {}} value={defaultRange} />
(args: DateRangeInputProps) => {
const [value, setValue] = useState<DateRange | null>(() => defaultRange);
return <DateRangeInput {...args} onChange={setValue} value={value} />;
}
Range exceeds 7 days
(args: DateRangeInputProps) => {
const [value, setValue] = useState<DateRange | null>(() => defaultRange);
return <DateRangeInput {...args} onChange={setValue} value={value} />;
}
(args: DateRangeInputProps) => {
const [value, setValue] = useState<DateRange | null>(() => defaultRange);
return <DateRangeInput {...args} onChange={setValue} value={value} />;
}
Select a check-in and check-out date.
(args: DateRangeInputProps) => {
const [value, setValue] = useState<DateRange | null>(() => defaultRange);
return <DateRangeInput {...args} onChange={setValue} value={value} />;
}
() => {
const [sm, setSm] = useState<DateRange | null>(() => defaultRange);
const [md, setMd] = useState<DateRange | null>(() => defaultRange);
const [lg, setLg] = useState<DateRange | null>(() => defaultRange);
return (
<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>
);
}
() => {
const [long, setLong] = useState<DateRange | null>(() => januaryRange);
const [short, setShort] = useState<DateRange | null>(() => januaryRange);
const [iso, setIso] = useState<DateRange | null>(() => januaryRange);
return (
<div style={{display: 'flex', flexDirection: 'column', gap: 16}}>
<DateRangeInput
format="long"
label="Long"
onChange={setLong}
value={long}
/>
<DateRangeInput
format="short"
label="Short (default)"
onChange={setShort}
value={short}
/>
<DateRangeInput
format="iso"
label="ISO"
onChange={setIso}
value={iso}
/>
</div>
);
}
<DateRangeInput {...args} onChange={() => {}} value={defaultRange} />

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

When isOptional: false, isRequired: false

PropTypeDefaultDescription
classNamestring—Additional CSS class names applied to the input wrapper.
data-testidstring—Test ID applied to the trigger button.
getIsDateDisabled(date: PlainDate) => boolean—Returns true for dates that should be disabled.
descriptionReactNode—Supporting text rendered below the label.
formatDateFormat'short'How each end of the committed range is displayed. Accepts a named preset — 'long' ("January 15, 2026"), 'short' ("Jan 15, 2026"), or 'iso' ("2026-01-15") — or a function receiving the date.
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.
isReadOnlybooleanfalseWhether the value is displayed without allowing focus or interaction.
label*string—Field label text.
labelEndReactNode—Content shown at the end of the label row, such as a link. It renders outside the label, so it does not focus the control or change its accessible name. It stays visible when isLabelHidden is true.
labelIconIconComponent—Icon shown before the label.
labelTooltipReactNode—Tooltip content shown next to the label.
maxPlainDate—Maximum selectable date.
maxRangeSpanTemporal.Duration—Maximum duration between the selected range start and end. Must be a non-negative, date-based Temporal duration.
minPlainDate—Minimum selectable date.
minRangeSpanTemporal.Duration—Minimum duration between the selected range start and end. Must be a non-negative, date-based Temporal duration.
numberOfMonths1 | 22Number of calendar months shown in the popover.
onChange*(value: DateRange | null) => void—Called when the selected date range changes.
placeholderstring—Placeholder text shown when no range is selected.
refRef<HTMLButtonElement>—Ref forwarded to the trigger button.
size"sm" | "md" | "lg"'md'Visual size of the input.
statusInputStatus—Validation status displayed below the input.
styleCSSProperties—Inline styles applied to the input wrapper.
value*DateRange | null—Currently selected date range. Pass null for an empty input.
isOptionalfalse—
isRequiredfalse—

When isOptional: true, isRequired: false

PropTypeDefaultDescription
classNamestring—Additional CSS class names applied to the input wrapper.
data-testidstring—Test ID applied to the trigger button.
getIsDateDisabled(date: PlainDate) => boolean—Returns true for dates that should be disabled.
descriptionReactNode—Supporting text rendered below the label.
formatDateFormat'short'How each end of the committed range is displayed. Accepts a named preset — 'long' ("January 15, 2026"), 'short' ("Jan 15, 2026"), or 'iso' ("2026-01-15") — or a function receiving the date.
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.
isReadOnlybooleanfalseWhether the value is displayed without allowing focus or interaction.
label*string—Field label text.
labelEndReactNode—Content shown at the end of the label row, such as a link. It renders outside the label, so it does not focus the control or change its accessible name. It stays visible when isLabelHidden is true.
labelIconIconComponent—Icon shown before the label.
labelTooltipReactNode—Tooltip content shown next to the label.
maxPlainDate—Maximum selectable date.
maxRangeSpanTemporal.Duration—Maximum duration between the selected range start and end. Must be a non-negative, date-based Temporal duration.
minPlainDate—Minimum selectable date.
minRangeSpanTemporal.Duration—Minimum duration between the selected range start and end. Must be a non-negative, date-based Temporal duration.
numberOfMonths1 | 22Number of calendar months shown in the popover.
onChange*(value: DateRange | null) => void—Called when the selected date range changes.
placeholderstring—Placeholder text shown when no range is selected.
refRef<HTMLButtonElement>—Ref forwarded to the trigger button.
size"sm" | "md" | "lg"'md'Visual size of the input.
statusInputStatus—Validation status displayed below the input.
styleCSSProperties—Inline styles applied to the input wrapper.
value*DateRange | null—Currently selected date range. Pass null for an empty input.
isOptional*true—
isRequiredfalse—

When isOptional: false, isRequired: true

PropTypeDefaultDescription
classNamestring—Additional CSS class names applied to the input wrapper.
data-testidstring—Test ID applied to the trigger button.
getIsDateDisabled(date: PlainDate) => boolean—Returns true for dates that should be disabled.
descriptionReactNode—Supporting text rendered below the label.
formatDateFormat'short'How each end of the committed range is displayed. Accepts a named preset — 'long' ("January 15, 2026"), 'short' ("Jan 15, 2026"), or 'iso' ("2026-01-15") — or a function receiving the date.
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.
isReadOnlybooleanfalseWhether the value is displayed without allowing focus or interaction.
label*string—Field label text.
labelEndReactNode—Content shown at the end of the label row, such as a link. It renders outside the label, so it does not focus the control or change its accessible name. It stays visible when isLabelHidden is true.
labelIconIconComponent—Icon shown before the label.
labelTooltipReactNode—Tooltip content shown next to the label.
maxPlainDate—Maximum selectable date.
maxRangeSpanTemporal.Duration—Maximum duration between the selected range start and end. Must be a non-negative, date-based Temporal duration.
minPlainDate—Minimum selectable date.
minRangeSpanTemporal.Duration—Minimum duration between the selected range start and end. Must be a non-negative, date-based Temporal duration.
numberOfMonths1 | 22Number of calendar months shown in the popover.
onChange*(value: DateRange | null) => void—Called when the selected date range changes.
placeholderstring—Placeholder text shown when no range is selected.
refRef<HTMLButtonElement>—Ref forwarded to the trigger button.
size"sm" | "md" | "lg"'md'Visual size of the input.
statusInputStatus—Validation status displayed below the input.
styleCSSProperties—Inline styles applied to the input wrapper.
value*DateRange | null—Currently selected date range. Pass null for an empty input.
isOptionalfalse—
isRequired*true—