Skip to content
Eskais UI

Forms

Date Time Picker

A date from the calendar and a time of day as one local "YYYY-MM-DDTHH:mm" value, composed from UI SDK DatePicker and TimeInput, with min/max, a time zone suffix and locale formatting.

Example

DD/MM/YYYY

CET

Local time in the region: 2026-11-20T09:30.

Installation

npx shadcn@latest add @eskais/date-time-picker

Usage

Import
import { DateTimePicker, TimeInput } from "@/components/ui/date-time-picker"

API reference

DateTimePicker

PropTypeDefault
valueA local date and time, `"2026-11-02T14:30"`, or `null`.string | null–
defaultValuestring | null–
onValueChangeRuns once both the date and the time are set, and with `null` when either is cleared.(value: string | null) => void–
minThe earliest date and time, like `"2026-11-02T09:00"`.string–
maxstring–
localeThe language of dates, times and the clock; the page's by default.string–
timeZoneThe zone the value is in, like `"Europe/Madrid"`. Shown after the time; the value stays local.string–
labelNames the date input, when no FieldLabel does.string–
labelsDateTimePickerLabels–
hourCycleComponentProps<typeof TimeInputPrimitive>["hourCycle"]–
namestring–
requiredboolean–
disabledboolean–
classNamestring–

Other exports

type DateTimePickerLabelstype DateTimePickerProps

Accessibility

  • The date and the time each have their own label, so they never share an id or a name.
  • timeZone shows the zone's short name and describes the time input.

Agent actions

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.