Skip to content

DateTimeInput

A combined date and time input with calendar popover and time fields.

<DateTimeInput
label="Meeting"
value={Temporal.PlainDateTime.from('2026-05-21T09:00')}
/>
<DateTimeInput label="Meeting" />
<DateTimeInput
label="Meeting"
hasSeconds
value={Temporal.PlainDateTime.from('2026-05-21T09:30:45')}
/>
<DateTimeInput
label="Meeting"
step={900}
value={Temporal.PlainDateTime.from('2026-05-21T09:30')}
/>
<DateTimeInput
label="Meeting"
min={Temporal.PlainDateTime.from('2026-05-01T08:00')}
max={Temporal.PlainDateTime.from('2026-05-31T18:00')}
value={Temporal.PlainDateTime.from('2026-05-15T12:00')}
/>
<DateTimeInput
label="Meeting"
isDisabled
value={Temporal.PlainDateTime.from('2026-05-21T09:00')}
/>
<DateTimeInput
label="Meeting"
isLoading
value={Temporal.PlainDateTime.from('2026-05-21T09:00')}
/>
<DateTimeInput
label="Meeting"
status={{message: 'Please select a valid date and time.', type: 'error'}}
value={Temporal.PlainDateTime.from('2026-05-21T09:00')}
/>
<DateTimeInput
label="Meeting"
size="sm"
value={Temporal.PlainDateTime.from('2026-05-21T09:00')}
/>
function DateTimeStory(args: DateTimeInputProps): React.JSX.Element {
const [value, setValue] = useState<PlainDateTime | null>(args.value);
return <DateTimeInput {...args} onChange={setValue} value={value} />;
}
<div style={{display: 'flex', flexDirection: 'column', gap: 16}}>
<DateTimeStory
label="Small"
onChange={() => {}}
size="sm"
value={Temporal.PlainDateTime.from('2026-05-21T09:00')}
/>
<DateTimeStory
label="Medium"
onChange={() => {}}
size="md"
value={Temporal.PlainDateTime.from('2026-05-21T09:00')}
/>
<DateTimeStory
label="Large"
onChange={() => {}}
size="lg"
value={Temporal.PlainDateTime.from('2026-05-21T09:00')}
/>
</div>
<DateTimeInput
label="Meeting"
isRequired
value={Temporal.PlainDateTime.from('2026-05-21T09:00')}
/>
<DateTimeInput
label="Meeting"
isOptional
value={Temporal.PlainDateTime.from('2026-05-21T09:00')}
/>
<DateTimeInput
label="Meeting"
isLabelHidden
value={Temporal.PlainDateTime.from('2026-05-21T09:00')}
/>
<DateTimeInput
label="Meeting"
labelTooltip="Select the date and time for the meeting."
value={Temporal.PlainDateTime.from('2026-05-21T09:00')}
/>
Choose a date and time during business hours.
<DateTimeInput
label="Meeting"
description="Choose a date and time during business hours."
value={Temporal.PlainDateTime.from('2026-05-21T09:00')}
/>
<DateTimeInput
label="Meeting"
format="iso"
value={Temporal.PlainDateTime.from('2026-01-15T09:00')}
/>
<DateTimeInput
label="Meeting"
isReadOnly
value={Temporal.PlainDateTime.from('2026-05-21T09:00')}
/>

A combined date and time input with calendar popover and time fields.

When isOptional: false, isRequired: false

PropTypeDefaultDescription
classNamestring—Additional CSS class names applied to the root element.
data-testidstring—Test ID applied to the root element.
getIsDateDisabled(date: PlainDate) => boolean—Returns true for dates that should be disabled.
descriptionReactNode—Supporting text rendered below the label.
formatDateFormat'long'How the committed date is displayed in the date field. Accepts a named preset — 'long' ("January 15, 2026"), 'short' ("Jan 15, 2026"), or 'iso' ("2026-01-15") — or a function receiving the selected date.
hasSecondsbooleanfalseWhether to show the seconds field in the time input.
isDisabledbooleanfalseWhether the input is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
isLoadingbooleanfalseWhether the input is in a loading state.
isReadOnlybooleanfalseWhether both values are 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.
maxPlainDateTime—Maximum selectable date-time.
minPlainDateTime—Minimum selectable date-time.
onChange*(value: PlainDateTime | null) => void—Called when the selected date-time changes.
refRef<HTMLInputElement>—Ref forwarded to the date input element.
size"sm" | "md" | "lg"'md'Visual size of the inputs.
statusInputStatus—Validation status displayed below the input.
stepnumber—Step increment in seconds for the time input and its picker.
styleCSSProperties—Inline styles applied to the root element.
value*PlainDateTime | null—Currently selected date-time. Pass null for an empty input.
isOptionalfalse—
isRequiredfalse—

When isOptional: true, isRequired: false

PropTypeDefaultDescription
classNamestring—Additional CSS class names applied to the root element.
data-testidstring—Test ID applied to the root element.
getIsDateDisabled(date: PlainDate) => boolean—Returns true for dates that should be disabled.
descriptionReactNode—Supporting text rendered below the label.
formatDateFormat'long'How the committed date is displayed in the date field. Accepts a named preset — 'long' ("January 15, 2026"), 'short' ("Jan 15, 2026"), or 'iso' ("2026-01-15") — or a function receiving the selected date.
hasSecondsbooleanfalseWhether to show the seconds field in the time input.
isDisabledbooleanfalseWhether the input is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
isLoadingbooleanfalseWhether the input is in a loading state.
isReadOnlybooleanfalseWhether both values are 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.
maxPlainDateTime—Maximum selectable date-time.
minPlainDateTime—Minimum selectable date-time.
onChange*(value: PlainDateTime | null) => void—Called when the selected date-time changes.
refRef<HTMLInputElement>—Ref forwarded to the date input element.
size"sm" | "md" | "lg"'md'Visual size of the inputs.
statusInputStatus—Validation status displayed below the input.
stepnumber—Step increment in seconds for the time input and its picker.
styleCSSProperties—Inline styles applied to the root element.
value*PlainDateTime | null—Currently selected date-time. Pass null for an empty input.
isOptional*true—
isRequiredfalse—

When isOptional: false, isRequired: true

PropTypeDefaultDescription
classNamestring—Additional CSS class names applied to the root element.
data-testidstring—Test ID applied to the root element.
getIsDateDisabled(date: PlainDate) => boolean—Returns true for dates that should be disabled.
descriptionReactNode—Supporting text rendered below the label.
formatDateFormat'long'How the committed date is displayed in the date field. Accepts a named preset — 'long' ("January 15, 2026"), 'short' ("Jan 15, 2026"), or 'iso' ("2026-01-15") — or a function receiving the selected date.
hasSecondsbooleanfalseWhether to show the seconds field in the time input.
isDisabledbooleanfalseWhether the input is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
isLoadingbooleanfalseWhether the input is in a loading state.
isReadOnlybooleanfalseWhether both values are 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.
maxPlainDateTime—Maximum selectable date-time.
minPlainDateTime—Minimum selectable date-time.
onChange*(value: PlainDateTime | null) => void—Called when the selected date-time changes.
refRef<HTMLInputElement>—Ref forwarded to the date input element.
size"sm" | "md" | "lg"'md'Visual size of the inputs.
statusInputStatus—Validation status displayed below the input.
stepnumber—Step increment in seconds for the time input and its picker.
styleCSSProperties—Inline styles applied to the root element.
value*PlainDateTime | null—Currently selected date-time. Pass null for an empty input.
isOptionalfalse—
isRequired*true—