Calendar
A date field component that allows users to enter and edit date.
Installation
›pnpm dlx shadcn@latest add @evolphin/calendar
Usage
import { Calendar } from "@/components/ui/calendar";const [date, setDate] = React.useState<Date | undefined>(new Date())
<Calendar
mode="single"
selected={date}
onSelect={setDate}
className="rounded-md border"
/>Type Definitions
import { } from "react-day-picker";
type = .<typeof >;Examples
Default
API Reference
Calendar
This component is a wrapper around react-day-picker. See the react-day-picker documentation for all available props.
| Prop | Type | Default | Description |
|---|---|---|---|
showOutsideDays | boolean | true | Show days from the previous and next month in the current month's calendar. |
className | string | - | Additional CSS classes |