Calendar
FormsA calendar component for displaying and selecting dates. Supports month navigation, date selection, and min/max date constraints.
Import
import { Calendar, MiniCalendar } from "@/components/ui/calendar";Usage
Basic Calendar
Select a date from the calendar
December 2025
Su
Mo
Tu
We
Th
Fr
Sa
With Min/Max Dates
Restrict selection to a specific date range
December 2025
Su
Mo
Tu
We
Th
Fr
Sa
Selection limited to 7 days ago through 30 days from today
Disabled Weekends
Disable specific dates based on a condition
December 2025
Su
Mo
Tu
We
Th
Fr
Sa
Weekends are disabled
Mini Calendar
Compact calendar for smaller spaces
December 2025
Su
Mo
Tu
We
Th
Fr
Sa
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
selected | Date | undefined | The currently selected date |
onSelect | (date: Date) => void | undefined | Callback when a date is selected |
defaultMonth | Date | new Date() | The initial month to display |
disabled | (date: Date) => boolean | undefined | Function to determine if a date should be disabled |
minDate | Date | undefined | Minimum selectable date |
maxDate | Date | undefined | Maximum selectable date |