Date input
A date typed one segment at a time, in the order the locale writes it, where a highlight glides between the segments and each number rolls to its new value.
Examples
Default
Type the date, or step each segment with the arrow keys: the highlight follows you and each number rolls to its new value.
Locale
locale sets the order, separators and placeholders; without it, the field follows the browser’s language.
Month and year
granularity='month' drops the day, and the value is yyyy-mm; granularity='year' leaves the year alone, as yyyy.
Date and time
With granularity='minute' the Time input’s segments follow the date’s, joined as the locale joins them, and the value is yyyy-mm-ddTHH:mm. hour and second set how fine the time goes.
Month format
monthFormat='short' writes the month as a name, typed by its number or its first letters.
Min and max
A date outside min and max shows as invalid, and a form won’t submit it.
Controlled
Hold the value with value and onValueChange; a value set from outside rolls each number the way it went.
Installation
npx shadcn@latest add https://kinoui.com/r/date-input.json- Files
lib/dates.tslib/segments.tslib/refs.tslib/field-control.tsxlib/segment-field.tsxlib/reduce-motion.tscomponents/kino/input.tsxlib/resize.tslib/run-progress.tslib/highlight.tslib/roll.tsxlib/scroll.tslib/segmented-input.tsxcomponents/kino/date-input.tsx- Packages
@base-ui/react- Global CSS
- the feels, the density tokens, the shape tokens and the success and warning colours
New to Kino? Installation covers what your project needs first and the @kino namespace.
API reference
Props
Accessibility
- Each segment is a spin button with its own name (day, month, year) and the field’s label: the arrow keys step it and wrap the day and month, Page Up and Page Down step a week, three months or five years, and Home and End go to its first and last value.
- A segment moves on as soon as no other digit could follow, a separator key moves on, and Backspace on an empty segment goes back. Left and right arrows follow the screen, in right-to-left pages too.
- Pasting
2026-11-14, or a date in the locale’s order, fills every segment. - An impossible or out-of-range date is invalid for the form and shows the invalid icon, so it never relies on colour alone.
- When the system asks for less motion, the highlight moves in place and the numbers crossfade.