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

January 2026

Su
Mo
Tu
We
Th
Fr
Sa

With Min/Max Dates

Restrict selection to a specific date range

January 2026

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

January 2026

Su
Mo
Tu
We
Th
Fr
Sa

Weekends are disabled

Mini Calendar

Compact calendar for smaller spaces

January 2026

Su
Mo
Tu
We
Th
Fr
Sa

API Reference

selectedundefined
Date

The currently selected date

onSelectundefined
(date: Date) => void

Callback when a date is selected

defaultMonthnew Date()
Date

The initial month to display

disabledundefined
(date: Date) => boolean

Function to determine if a date should be disabled

minDateundefined
Date

Minimum selectable date

maxDateundefined
Date

Maximum selectable date