Datetime Picker

Segmented date and time input with keyboard stepping, powered by timescape.

Datetime Picker

Segmented date and time input with keyboard stepping, powered by timescape.

Preview

//|:

Features

  • Arrow keys step each segment; typing jumps to the next one.
  • Configurable segment order and 12/24-hour clocks.

Installation

npx shadcn@latest add https://www.shadcn-form.com/r/datetime-picker.json

The CLI installs every dependency listed in the registry item.

Usage

import { DatetimePicker } from '@/components/ui/datetime-picker'
const [date, setDate] = React.useState<Date | undefined>(new Date())
<DatetimePicker
value={date}
onChange={setDate}
format={[
['months', 'days', 'years'],
['hours', 'minutes', 'am/pm'],
]}
/>