Rxova
Skip to content

DateInputProps

optional aria-describedby?: string;

ids of external error/help text.


optional className?: string;

optional defaultValue?: string | null;

Uncontrolled initial value as YYYY-MM-DD. 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 date 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 id?: string;

Base id; each segment derives ${id}-day, ${id}-month, ${id}-year.


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 month names.

the runtime's locale

optional max?: string;

Latest allowed date, inclusive, as YYYY-MM-DD.


optional min?: string;

Earliest allowed date, inclusive, as YYYY-MM-DD.


optional name?: string;

Emits a hidden input carrying the ISO 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 date becomes complete and valid, and when it stops being so. Never fires mid-entry with a half-typed date.

ParameterType
valuestring | null

void


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

void


optional onPartsChange?: (parts) => void;

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

ParameterType
partsDateParts

void


optional onWarn?: (warning) => void;

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

ParameterType
warningDateWarning

void


optional placeholders?: DatePlaceholders;

Placeholder per segment.

dd / mm / yyyy


optional readOnly?: boolean;

optional renderSegment?: (state) => ReactNode;

Custom rendering for one segment.

ParameterType
stateDateSegmentState

ReactNode


optional required?: boolean;

optional segmentLabels?: DateSegmentLabels;

Accessible name per segment.

Day / Month / Year


optional style?: CSSProperties;

optional value?: string | null;

Controlled value as YYYY-MM-DD, or null for empty.

A string, never a Date: a calendar date is not a point in time, and the moment it becomes one it acquires a timezone that shifts it by a day west of UTC. See the README.