Pro
Date input
A date field you type into, with the reading shown live and a month that carries data marks.
pnpm dlx shadcn@latest add @caliper/date-inputWhen to use
Use it for
- Scheduling where typing “next fri” beats clicking through months.
- Dates where some days carry data (invoices due) or are unavailable for a reason.
Skip it when
- People mostly browse a month; use the date picker or calendar.
Decisions
Why it is built this way, so you know what to keep when you change your copy.
Behaviour
- It shows what it read before it commits
- Typed text such as “next fri” or “in 2 weeks” is read back in mono under the field, and Enter commits it, so a misread date is caught before it is saved.
Usage
- Let people type
- Most dates are faster to type than to pick. Keep the calendar for browsing and the field for knowing.
Installation
pnpm dlx shadcn@latest add @caliper/date-input
Adds its 6 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage
Import it from your copy of the source. The example behind the preview comes with the source. It is built from DateInput and parseNaturalDate.
import { DateInput, parseNaturalDate } from "@/components/ui/date-input"
The worked example comes with Pro
The 39-line example behind the preview opens here, ready to copy.
- 626 Pro parts, blocks and page templates, all with source
- $149 once, with lifetime updates. No renewal
- A full refund within 14 days if it is not for you
API reference
DateInput
component
parseNaturalDate
component
No props of its own; it accepts the native props of its root element.
Accessibility
It is built on native elements and keeps aria-invalid, aria-describedby, aria-label, aria-hidden and aria-live in step with state. Changes that matter are announced through a live region.
Motion
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.