Date picker
Holds a day, a start and an end, or several days in a form field that opens a calendar to pick them and sends them with the form.
Examples
Up to five days. A desk is held for you from 9am on each one.
$145.00 a night.Struck-through nights are booked.
Holdings reports and offering notices filed in this range.
Holdings are shown as filed on this day. Type 9/30/2025, Sep 30 2025 or 2025-09-30.
Holdings are shown as filed on this day.
States
Set when the contract was signed.
Choose a check-in date to see the price.
Usage
Use it when
- A form or filter field for a day, such as a check-in date or "filed on or after".
- A stay or a reporting period, a start and an end in one field.
- Several separate days in one field, such as the days a desk is booked.
Use something else when
- A calendar that is the page's main content, always in view. Use Calendar instead.
- Only a few named periods and never days of your own, such as a chart's 1M, 3M, 1Y. Use SegmentedControl instead.
Rules
General
Content
Avoid
Limits
Install
npx shadcn@latest add https://kaanarici.com/r/cobalt/date-picker.jsonimport { DatePicker, datePresets, type DatePreset } from "@/components/cobalt/ui/date-picker"