Search for a command to run...
A calendar component lets users select a date without any input or popper / modal.
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
The <Calendar /> component is built on top of React DayPicker.
pnpm dlx shadcn@latest add https://ui-x.junwen-k.dev/r/calendar.jsonimport { Calendar } from "@/components/ui/calendar";const [date, setDate] = React.useState<Date | undefined>(new Date());
return (
<Calendar
mode="single"
selected={date}
onSelect={setDate}
className="rounded-md border"
/>
);See the React DayPicker documentation for more information.
For a complete Date Picker component with date input functionality, you can use the <DatePicker> component directly. See the Date Picker page for more information.
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|