Skip to contentKino
Skip to Content

Date picker

A React date picker built on Base UI. Type a date into its segments or pick it from a calendar that opens beside the field, one day, a range, a month, a year or a date and its time, with presets, a clear button and form validation.

npx shadcn add https://kinoui.com/r/date-picker.json
Share on

Examples

Ship the Lisbon report

Interview notes, card fees by café, and what to try next.

Default

Type the date, or press the calendar button to pick it. The pick closes the calendar and rolls each segment to its new value.

Book Casa do Rio

Two guests, two nights at least.

3 nights · £252

Range

With mode="range" the box holds two dates and one highlight glides across both. The calendar stays open until both ends are picked, and the value is [start, end], null until then.

Download a statement

Every payment, fee and payout, as a PDF.

From March 2025, when the account opened.

Month

With granularity='month' the box drops the day and the calendar picks one of the year’s twelve months. The value is yyyy-mm, and granularity='year' picks a year the same way.

Call with Amara Okafor

Onboarding for Kestrel Bakery, 30 minutes.

London time.

Date and time

With granularity='minute' the box holds the date and the time, and the time sits under the calendar. A day picked before its time moves focus to the time, and the calendar closes once both are in. The value is yyyy-mm-ddTHH:mm.

Export card payments

Kestrel Bakery, Lisbon. Up to 92 days at a time.

Presets

DatePickerPresets puts the ranges people ask for most beside the calendar and marks the one the value matches. DatePickerClear empties the field once it holds a date.

Schedule the newsletter

“Five cafés, one card reader”, to 2,480 readers.
Send on

Button

For a date that is picked, never typed, DatePickerButton writes it in words and opens the calendar. Its children show until a day is picked.

Request a demo visit

We bring the card reader to your shop.

Weekdays, from next Monday.

In a form

In a Field, the label names the field and the date is sent as yyyy-mm-dd under the Field’s name. With required, sending it empty shows the error and focuses the first segment. A typed day the picker won’t take, such as a Saturday here, fails the same way.

Launch in Austin

Kino’s first café outside Europe.

Locale

locale sets the segments’ order and the calendar’s names and first weekday: month first in the United States. monthFormat="short" types the month by name.

Installation

npx shadcn@latest add https://kinoui.com/r/date-picker.json
Files
lib/reduce-motion.tslib/scroll.tslib/refs.tslib/resize.tslib/swap.tsxlib/popup.tslib/glide.tsxcomponents/kino/tooltip.tsxlib/cut.tsxlib/dates.tscomponents/kino/spinner.tsxcomponents/kino/button.tsxlib/controllable.tslib/field-control.tsxcomponents/kino/popover.tsxlib/run-progress.tslib/highlight.tslib/pill.tscomponents/kino/calendar.tsxlib/calendar-model.tslib/calendar-state.tslib/calendar-grid.tsxlib/calendar-choices.tsxlib/segments.tslib/segment-field.tsxcomponents/kino/input.tsxlib/roll.tsxlib/segmented-input.tsxcomponents/kino/time-input.tsxcomponents/kino/textarea.tsxcomponents/kino/input-group.tsxcomponents/kino/segmented-control.tsxlib/roomy.tscomponents/kino/date-picker.tsx
Packages
@base-ui/reactclass-variance-authority

New to Kino? Installation covers what your project needs first and the @kino namespace.

API reference

DatePicker

PropTypeDefaultDescription
mode'single''range''single'One date, or a range from one date to another.
granularity'year''month''day''hour''minute''second''day'The smallest unit picked, which sets the value’s form. To the month or the year, the calendar picks one of twelve; finer than a day, the time is typed in the field and under the calendar, and the calendar stays open until both are in. A range is picked to the day.
valuestring | null[string, string] | nullNoneThe date, or the range, when you hold the state. A range is null until both ends are in, in order.
defaultValuestring | null[string, string] | nullNoneThe value at first, when it holds its own state.
onValueChange(value) => voidNoneCalled with the new value once a typed date is whole, a day is picked or the field is cleared. A date half typed calls nothing.
openbooleanNoneWhether the calendar is open, when you hold it.
defaultOpenbooleanfalseWhether the calendar is open at first.
onOpenChange(open) => voidNoneCalled when the calendar opens or closes.
closeOnSelectbooleantrueCloses the calendar once a day is picked, or both ends of a range.
minstringNoneThe earliest value, in the value’s form or as a day. One typed before it shows as invalid, and the calendar stops at it.
maxstringNoneThe latest value, in the value’s form or as a day, which allows all of that day.
unavailableDateMatchersNoneDays that can’t be picked, as the Calendar (opens in a new tab)’s unavailable takes them. One typed shows invalid and fails the form’s check.
minDaysnumberNoneIn a range, the fewest days, both ends counted. The calendar keeps to it, and a range typed shorter fails the form’s check.
maxDaysnumberNoneIn a range, the most days, both ends counted.
localestringNoneSets the segments’ order and the calendar’s names and first weekday. The browser’s language by default.
hourCycle1224NoneWith a time, a 12-hour clock with AM and PM, or a 24-hour one. The locale’s by default.
disabledbooleanfalseNothing can be typed or picked. In a Field, the Field’s.
readOnlybooleanfalseThe date shows and can’t be changed; the calendar button is off.
requiredbooleanfalseA form can’t be sent until a date is in. A range with only one date in fails the check whether or not it is required.
namestringNoneSends the value with a form under this name, in its form. In a Field, the Field’s name wins.
startNamestringNoneIn a range, sends the start under this name. In a Field, the Field’s name wins.
endNamestringNoneIn a range, sends the end under this name.
formstringNoneThe form the dates go with, when the picker sits outside it.
labelsPartial<DatePickerLabels>NoneThe names of the picker’s own parts, in place of the English ones: open (the calendar button), clear, start, end and time, and the messages a form shows: incomplete, incompleteDateTime, backwards, unavailable, tooShort and tooLong.

DatePickerInput

PropTypeDefaultDescription
monthFormat'numeric''short''numeric'Shows the month as a short name (Nov) in place of its number.

DatePickerButton

PropTypeDefaultDescription
formatIntl.DateTimeFormatOptionsNoneHow the value is written; as the locale writes it by default: 14 Nov 2026, November 2026, 14 Nov 2026, 09:30. A range shares what its ends have in common: 2–8 Nov 2026.

DatePickerPreset

PropTypeDefaultDescription
valuestring[string, string]NoneThe date it sets, or the range.

Data attributes

AttributeOnDescription
data-rangeDatePickerInputPresent in range mode.
data-invalid, data-filled, data-focused, data-disabled, data-readonlythe group around one date’s segmentsAs on the Date input (opens in a new tab).
data-placeholderDatePickerButtonPresent while no date is picked.
data-shownthe wrapper around DatePickerClearPresent while there is a date to clear.

CSS variables

VariableSet it onDefaultDescription
--calendar-slide, --calendar-zoomDatePickerCalendar, or anything above it1.5rem, 0.92How the calendar’s months move, as on the Calendar (opens in a new tab).

Accessibility

  • Each segment is a spinbutton, as in the Date input (opens in a new tab): digits move on by themselves, the arrows step a segment, and Tab goes from segment to segment. A range’s two dates are groups named after the field: "Stay, Start date" and "Stay, End date".
  • The calendar button opens a Popover (opens in a new tab) with focus on the picked day, or today, for the keys of the WAI-ARIA date grid (opens in a new tab). Escape closes it, and focus goes back to the button; so does a pick.
  • In a Field, the label names the field and focuses its first segment, and the description and error describe it. A date outside min and max fails the form’s check, as a native date input does.
  • The clear button is named by labels.clear and leaves once the field is empty, with focus on the first segment.
  • Every built-in name comes from labels, so the picker speaks its page’s language.
  • When the system asks for less motion, the highlight and the numbers change at once, and the calendar only fades.