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"
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')}
/>
<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')}
/>

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

When isOptional: false, isRequired: false

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the root element.
data-testidstringTest ID applied to the root element.
getIsDateDisabled(date: PlainDate) => booleanReturns true for dates that should be disabled.
descriptionReactNodeSupporting text rendered below the label.
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.
label*stringField label text.
labelIconIconComponentIcon shown before the label.
labelTooltipReactNodeTooltip content shown next to the label.
maxPlainDateTimeMaximum selectable date-time.
minPlainDateTimeMinimum selectable date-time.
onChange*(value: PlainDateTime | null) => voidCalled 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.
statusInputStatusValidation status displayed below the input.
styleCSSPropertiesInline styles applied to the root element.
value*PlainDateTime | nullCurrently selected date-time. Pass null for an empty input.
isOptionalfalse
isRequiredfalse

When isOptional: true, isRequired: false

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the root element.
data-testidstringTest ID applied to the root element.
getIsDateDisabled(date: PlainDate) => booleanReturns true for dates that should be disabled.
descriptionReactNodeSupporting text rendered below the label.
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.
label*stringField label text.
labelIconIconComponentIcon shown before the label.
labelTooltipReactNodeTooltip content shown next to the label.
maxPlainDateTimeMaximum selectable date-time.
minPlainDateTimeMinimum selectable date-time.
onChange*(value: PlainDateTime | null) => voidCalled 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.
statusInputStatusValidation status displayed below the input.
styleCSSPropertiesInline styles applied to the root element.
value*PlainDateTime | nullCurrently selected date-time. Pass null for an empty input.
isOptional*true
isRequiredfalse

When isOptional: false, isRequired: true

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the root element.
data-testidstringTest ID applied to the root element.
getIsDateDisabled(date: PlainDate) => booleanReturns true for dates that should be disabled.
descriptionReactNodeSupporting text rendered below the label.
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.
label*stringField label text.
labelIconIconComponentIcon shown before the label.
labelTooltipReactNodeTooltip content shown next to the label.
maxPlainDateTimeMaximum selectable date-time.
minPlainDateTimeMinimum selectable date-time.
onChange*(value: PlainDateTime | null) => voidCalled 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.
statusInputStatusValidation status displayed below the input.
styleCSSPropertiesInline styles applied to the root element.
value*PlainDateTime | nullCurrently selected date-time. Pass null for an empty input.
isOptionalfalse
isRequired*true