Date Input
UI SDK DateInput styled as a field: a date typed segment by segment in the locale's order, ISO values, min, max and unavailable dates marked invalid, floating labels and FormField binding.
Example
Type it, or paste a whole date.
date-input-demo.tsxCopy code
Installation
Copy code
Usage
ImportCopy code
Reach for it for a date people know and type, like a birthday or a start date; DatePicker adds a calendar.
API reference
DateInput
DateInputSegment
Other exports
createDateInputControllertype DateInputControllertype DateInputGranularitytype DateInputSegmentStatetype DateInputValueChangeReasontype DateMatchersAccessibility
- A group named by its Field label; each segment is a spin button named by its unit in the page's language.
- Typing fills a segment and moves on, arrows step it, and a pasted date fills them all.
Agent actions
Agents find it by its label and set an ISO date with setValue.
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.