Rxova
Skip to content

TimeInputProps

optional aria-describedby?: string;

ids of external error/help text.


optional className?: string;

optional defaultValue?: string | null;

Uncontrolled initial value. Ignored when value is given.


optional dir?: "ltr" | "rtl";

Writing direction for the field. Inherited from the document when unset.

Distinct from the locale: locale decides which segments there are and in what order, dir decides which way the box lays them out. A Hebrew page showing a Gregorian date needs one without the other.


optional disabled?: boolean;

optional emitOutOfRange?: boolean;

Report a completed time outside min/max through onChange anyway, leaving the field marked invalid rather than refusing the input.

true — the alternative silently discards what the user typed.

optional hour12?: boolean;

Force a 12- or 24-hour clock.

whatever the locale uses

optional id?: string;

Base id; each segment derives ${id}-hour, ${id}-minute, …


optional invalid?: boolean;

Sets aria-invalid and data-invalid on the group.


optional label?: ReactNode;

Accessible name for the whole field.


optional locale?: string;

BCP 47 tag deciding segment order, separators and the clock.


optional max?: string;

Latest allowed time, inclusive, as HH:mm[:ss].


optional min?: string;

Earliest allowed time, inclusive, as HH:mm[:ss].


optional minuteStep?: number;

Arrow-key step for the minute segment, in minutes. Must divide 60.

1

optional name?: string;

Emits a hidden input carrying the 24-hour value, readable by a native <form>.


optional onBlur?: (event) => void;

Fires when focus leaves the whole field, not when moving between segments.

ParameterType
eventFocusEvent<HTMLElement>

void


optional onChange?: (value) => void;

Fires when the time becomes complete and valid, and when it stops being so. Never fires mid-entry with a half-typed number.

ParameterType
valuestring | null

void


optional onFocus?: (event) => void;
ParameterType
eventFocusEvent<HTMLElement>

void


optional onPartsChange?: (parts) => void;

Fires on every keystroke, including while the time is incomplete.

ParameterType
partsTimeParts

void


optional onWarn?: (warning) => void;

Called in development whenever a prop is rejected or coerced — see TimeWarning. When omitted, the same warnings go to console.warn. The entire path is stripped from production builds.

ParameterType
warningTimeWarning

void


optional placeholders?: TimePlaceholders;

Placeholder per segment.

hh / mm / ss / --


optional readOnly?: boolean;

optional renderSegment?: (state) => ReactNode;

Custom rendering for one segment.

ParameterType
stateTimeSegmentState

ReactNode


optional required?: boolean;

optional secondStep?: number;

Arrow-key step for the seconds segment, in seconds. Must divide 60.

1

optional segmentLabels?: TimeSegmentLabels;

Accessible name per segment.

Hour / Minute / Second / AM/PM


optional showSeconds?: boolean;

Show a seconds segment.

false

optional style?: CSSProperties;

optional value?: string | null;

Controlled value as HH:mm or HH:mm:ss, 24-hour, or null for empty.

Always 24-hour whatever the field displays: one canonical format means a value can be stored, compared and sorted without knowing which locale produced it. A string, never a Date — a time of day is not an instant.