Skip to content
Eskais UI

Forms

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.

Installation

npx shadcn@latest add @eskais/date-input
Brings alongfieldinput

Usage

Import
import { createDateInputController, DateInput, DateInputSegment } from "@/components/ui/date-input"

Reach for it for a date people know and type, like a birthday or a start date; DatePicker adds a calendar.

API reference

Other exports

createDateInputControllertype DateInputControllertype DateInputGranularitytype DateInputSegmentStatetype DateInputValueChangeReasontype DateMatchers

Accessibility

  • 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.