Calendar

Forms

A 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

PropTypeDefaultDescription
selectedDateundefinedThe currently selected date
onSelect(date: Date) => voidundefinedCallback when a date is selected
defaultMonthDatenew Date()The initial month to display
disabled(date: Date) => booleanundefinedFunction to determine if a date should be disabled
minDateDateundefinedMinimum selectable date
maxDateDateundefinedMaximum selectable date

Related Components