Date Input

A locale-aware segmented date input with customizable segment order, separator, and standardized YYYY-MM-DD output.

Loading...

Installation

$npx shadcn@latest add @craftdotui/craftui-date-input

Anatomy

<DateInput value={value} onValueChange={setValue} />
<DateInput locale="en-US" value={value} onValueChange={setValue} />
<DateInput
  dateFormat={{
    order: ["day", "month", "year"],
    separator: "/",
  }}
  value={value}
  onValueChange={setValue}
/>

Demo

Locales

Loading...

Custom Format

Loading...

Min & Max Bounds

Loading...

Props

DateInput

Prop
Type
Default