Smart Datetime Input

Natural-language date input ("tomorrow at 3pm") with a calendar and time list fallback.

Smart Datetime Input

Natural-language date input ("tomorrow at 3pm") with a calendar and time list fallback.

Preview

Value: —

Features

  • Parses natural language with chrono-node.
  • Calendar and time list for pointer users.
  • Locale and 12/24-hour aware.

Installation

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

The CLI installs every dependency listed in the registry item.

Usage

import { SmartDatetimeInput } from '@/components/ui/smart-datetime-input'
const [date, setDate] = React.useState<Date | null>(null)
<SmartDatetimeInput
value={date}
onValueChange={setDate}
placeholder="e.g. tomorrow at 3pm"
/>