---
title: "Calendar"
description: "A date grid for picking a single date, several dates, or a range, with month navigation and dropdowns. Built on React DayPicker."
plan: Free
docs: https://ui.edbn.me/docs/components/calendar
---

# Calendar

A date grid for picking a single date, several dates, or a range, with month navigation and dropdowns. Built on React DayPicker.

## Installation

```bash
npx shadcn@4.19.0 add https://ui.edbn.me/r/calendar.json
```

## Dependencies
- npm: lucide-react@^1.33.0, react-day-picker@^10.0.1
- edbn: edbn-base, button

## Usage

```tsx examples/calendar-basic.tsx
"use client";
import * as React from "react";
import { Calendar } from "@/components/ui/calendar";

function CalendarDemo() {
  const [date, setDate] = React.useState<Date | undefined>(new Date());
  return <Calendar mode="single" selected={date} onSelect={setDate} />;
}

export default function CalendarBasicPreview() {
  return <CalendarDemo />;
}
```

## Files
- components/ui/calendar.tsx (244 lines)

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
