TimeInput

A 24-hour segmented time field that matches DateInput. Direct numeric entry uses the same replacement, focus, validation, disabled, and empty-value behavior.

Props

PropTypeRequiredDefaultDescription
timeDate | nullYes-Controlled time value; null represents an empty field
onTimeChange(time: Date | null) => voidYes-Called after valid entry or clearing the field
labelstringNo-Visible and accessible field label
aria-labelstringNo"Time"Accessible label when no visible label is used
namestringNo-Submits a 24-hour HH:MM value through a hidden input
disabledbooleanNofalseDisables time entry
readOnlybooleanNofalsePrevents changes while retaining the displayed value
requiredbooleanNofalseMarks both time segments as required
aria-invalidbooleanNofalseApplies the shared invalid-field treatment
jssJSSNo-Styles the field wrapper

Provide either label or aria-label so the grouped time segments have an accessible name.

Basic usage

:
14:30
const [time, setTime] = useState<Date | null>(new Date());

<TimeInput label="Start time" time={time} onTimeChange={setTime} />;

Focus selects a complete segment, so normal typing replaces the existing hour or minute. Completing the hour advances focus to the minute.

Empty value

:
const [time, setTime] = useState<Date | null>(null);

<TimeInput aria-label="End time" time={time} onTimeChange={setTime} />;

Validation and states

:
:

Completed values outside 00:00 through 23:59 receive the invalid-field treatment and are not committed.