UI.MD

Calendar

A date picker calendar built on react-day-picker with UI.MD styling.

Installation

$
npx shadcn@latest add https://ui.mattdowney.com/r/calendar.json

Usage

import { Calendar } from "@/components/ui/calendar"

Examples

Default

August 2026

Range

August 2026

API Reference

PropTypeDefaultDescription
mode"single" | "multiple" | "range"-Selection mode. Pair with selected and onSelect for controlled selection.
selectedDate | Date[] | DateRange | undefined-The current selection; its shape depends on mode.
onSelect(selected) => void-Called with the new selection when a day is picked.
showOutsideDaysbooleantrueShows the leading and trailing days of adjacent months in each grid.
captionLayout"label" | "dropdown" | "dropdown-months" | "dropdown-years""label"How the month caption renders: a static label or month/year dropdowns.
buttonVariant"default" | "soft" | "outline" | "ghost" | "text" | "destructive" | "subtle" | "ghost-destructive" | "link""ghost"Button variant used for the previous/next navigation buttons.
numberOfMonthsnumber1Number of months displayed side by side.
disabledMatcher | Matcher[]-Dates that cannot be selected, e.g. { before: new Date() }.