Skip to content

TimeInput

Time picker input field with optional seconds granularity.

<TimeInput {...args} onChange={setValue} value={value} />
<TimeInput {...args} onChange={setValue} value={value} />
<TimeInput {...args} onChange={setValue} value={value} />
<TimeInput {...args} onChange={setValue} value={value} />
<TimeInput {...args} onChange={() => {}} value={TIME_0900} />
<TimeInput {...args} onChange={() => {}} value={TIME_0900} />
<TimeInput {...args} onChange={setValue} value={value} />
Outside business hours
<TimeInput {...args} onChange={setValue} value={value} />
Time slot available
<TimeInput {...args} onChange={setValue} value={value} />
<div style={{display: 'flex', flexDirection: 'column', gap: 16}}>
<TimeInput label="Small" onChange={setSm} size="sm" value={sm} />
<TimeInput label="Medium" onChange={setMd} size="md" value={md} />
<TimeInput label="Large" onChange={setLg} size="lg" value={lg} />
</div>
<TimeInput {...args} onChange={setValue} value={value} />
<TimeInput {...args} onChange={setValue} value={value} />
Select a time in your local timezone.
<TimeInput {...args} onChange={setValue} value={value} />
<TimeInput {...args} onChange={setValue} value={value} />
<TimeInput {...args} onChange={setValue} value={value} />

Time picker input field with optional seconds granularity.

When isOptional: false, isRequired: false

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the input wrapper.
data-testidstringTest ID applied to the input element.
descriptionReactNodeSupporting text displayed below the label.
hasAutoFocusbooleanfalseWhether to focus the input on mount.
hasClearbooleanfalseWhether to show a clear button when a value is set.
hasSecondsbooleanfalseWhether the input includes a seconds field.
htmlNamestringHTML name attribute.
isDisabledbooleanfalseWhether the input is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
isLoadingbooleanfalseWhether the input is loading.
label*stringField label.
labelIconIconComponentIcon shown before the label.
labelTooltipReactNodeTooltip content shown next to the label.
maxPlainTimeLatest allowed time.
minPlainTimeEarliest allowed time.
onBlur(event: FocusEvent<HTMLInputElement>) => voidCalled when the input loses focus.
onChange*(value: PlainTime | null) => voidCalled when the time value changes.
onFocus(event: FocusEvent<HTMLInputElement>) => voidCalled when the input gains focus.
placeholderstring'Select a time'Placeholder text.
refRef<HTMLInputElement>Ref forwarded to the input element.
size"sm" | "md" | "lg"'md'Visual size.
statusInputStatusValidation status displayed below the input.
stepnumberStep increment in seconds for the time picker.
styleCSSPropertiesInline styles applied to the input wrapper.
value*PlainTime | nullControlled time value. 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.
descriptionReactNodeSupporting text displayed below the label.
hasAutoFocusbooleanfalseWhether to focus the input on mount.
hasClearbooleanfalseWhether to show a clear button when a value is set.
hasSecondsbooleanfalseWhether the input includes a seconds field.
htmlNamestringHTML name attribute.
isDisabledbooleanfalseWhether the input is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
isLoadingbooleanfalseWhether the input is loading.
label*stringField label.
labelIconIconComponentIcon shown before the label.
labelTooltipReactNodeTooltip content shown next to the label.
maxPlainTimeLatest allowed time.
minPlainTimeEarliest allowed time.
onBlur(event: FocusEvent<HTMLInputElement>) => voidCalled when the input loses focus.
onChange*(value: PlainTime | null) => voidCalled when the time value changes.
onFocus(event: FocusEvent<HTMLInputElement>) => voidCalled when the input gains focus.
placeholderstring'Select a time'Placeholder text.
refRef<HTMLInputElement>Ref forwarded to the input element.
size"sm" | "md" | "lg"'md'Visual size.
statusInputStatusValidation status displayed below the input.
stepnumberStep increment in seconds for the time picker.
styleCSSPropertiesInline styles applied to the input wrapper.
value*PlainTime | nullControlled time value. 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.
descriptionReactNodeSupporting text displayed below the label.
hasAutoFocusbooleanfalseWhether to focus the input on mount.
hasClearbooleanfalseWhether to show a clear button when a value is set.
hasSecondsbooleanfalseWhether the input includes a seconds field.
htmlNamestringHTML name attribute.
isDisabledbooleanfalseWhether the input is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
isLoadingbooleanfalseWhether the input is loading.
label*stringField label.
labelIconIconComponentIcon shown before the label.
labelTooltipReactNodeTooltip content shown next to the label.
maxPlainTimeLatest allowed time.
minPlainTimeEarliest allowed time.
onBlur(event: FocusEvent<HTMLInputElement>) => voidCalled when the input loses focus.
onChange*(value: PlainTime | null) => voidCalled when the time value changes.
onFocus(event: FocusEvent<HTMLInputElement>) => voidCalled when the input gains focus.
placeholderstring'Select a time'Placeholder text.
refRef<HTMLInputElement>Ref forwarded to the input element.
size"sm" | "md" | "lg"'md'Visual size.
statusInputStatusValidation status displayed below the input.
stepnumberStep increment in seconds for the time picker.
styleCSSPropertiesInline styles applied to the input wrapper.
value*PlainTime | nullControlled time value. Pass null for an empty input.
isOptionalfalse
isRequired*true