# Date Picker > Calendar in a popover for single dates and ranges. Import from `@aspyn-io/kit`. Scaffold source: `npx shadcn@latest add https://design.aspyn.io/r/date-picker.json` ## Install ```tsx import { Button, Calendar, Popover, PopoverContent, PopoverTrigger, } from "@aspyn-io/kit"; ``` ### Single date The date-picker pattern: a Calendar inside a Popover, with a Button trigger showing the formatted value. ```tsx const [open, setOpen] = React.useState(false); const [date, setDate] = React.useState(); { setDate(d); setOpen(false); }} /> ``` ### Date range Swap the Calendar to mode="range" and render two months for range selection. ```tsx const [range, setRange] = React.useState(); ``` ## Notes - Date Picker is a composition, not a separate component: Button + Popover + Calendar. Everything the Calendar supports (month/year dropdowns, disabled matchers, min/max) applies here. - Close the popover on select for single dates; leave it open for ranges so users can pick both ends.