Docs

Data feedback

Calendar

Interactive month calendar for single date selection.

5 examplesInteractive ComponentReact 19 & Next.js 16Tailwind CSS v4
Install
pnpm add @quinkit/ui react-day-picker
Import
import { Calendar } from "@quinkit/ui";

Required packages

Powers Calendar and DateRangePicker. Add these packages before using this component:

  • @quinkit/ui
  • react-day-picker

Install command is shown above. Without the peer package, imports will fail at build time.

Interactive Examples

Live previews · code · themes · viewport · dark mode

Single Date Selection

Select one date from the monthly calendar grid.

Single Date Selection rendered preview

July 2026

Selected: Jul 15, 2026

Date Range Selection

Select a start and end date across two months.

Date Range Selection rendered preview

July 2026
August 2026

Disabled Dates

Block weekends and past dates from selection.

Disabled Dates rendered preview

July 2026

Weekends and past dates are blocked.

Appointment Booking Flow

Calendar paired with available time slot buttons.

Appointment Booking Flow rendered preview

Schedule Consultation

July 2026

Available Time Slots

Controlled Selected State

Calendar component connected to external state handler.

Controlled Selected State rendered preview

July 2026

Selected: Jul 15, 2026

Overview

The Calendar component provides an accessible, responsive date-selection interface powered by react-day-picker. It supports single-date selection, date range selection, disabled date rules, and custom month navigators styled with semantic design tokens.

Installation

bash
pnpm add @quinkit/ui react-day-picker

react-day-picker is a required peer dependency for Calendar.

Usage Examples

### Single Date Selection

tsx
import { useState } from "react";
import { Calendar } from "@quinkit/ui";

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

### Date Range Selection

tsx
import { useState } from "react";
import { Calendar, type DateRange } from "@quinkit/ui";

export function RangeCalendarDemo() {
  const [range, setRange] = useState<DateRange | undefined>();
  return <Calendar mode="range" selected={range} onSelect={setRange} numberOfMonths={2} />;
}

Props

PropTypeDefaultDescription
mode"single" | "range" | "multiple""single"Selection mode.
selectedDate | DateRange | Date[]undefinedCurrently selected date or date range.
onSelectFunctionundefinedCallback triggered on date selection.
numberOfMonthsnumber1Number of months displayed concurrently.
showOutsideDaysbooleantrueShow dates from adjacent months.
disabledMatcher | Matcher[]undefinedDates or matchers that cannot be selected.
classNamestringundefinedAdditional class names for root container.

Accessibility Details

  • Full WAI-ARIA grid role semantics for screen readers.
  • Focusable day buttons with visible focus rings.
  • Accessible month navigation controls with aria-labels.

Keyboard Interaction

  • Tab / Shift+Tab: Move focus into and out of the calendar grid.
  • Arrow Keys: Navigate between day cells.
  • Enter / Space: Select the focused date.

Accessibility & Keyboard

Calendar adheres to WAI-ARIA design patterns for accessible web components.

Keyboard Navigation

  • Tab / Shift + Tab — Focuses control and moves between interactive elements.
  • Space / Enter — Triggers action or toggles selection.
  • Escape — Closes open popovers, overlays, or dropdown menus.

ARIA Standards

  • Built with semantic HTML tags and explicit aria-* attributes.
  • Uses high-contrast focus rings (ring-ring) visible in both light & dark mode.
  • Supports screen readers with non-visual label fallbacks.

Registry Install

Add a shadcn-compatible bridge file to your project that re-exports from @quinkit/ui.

Registry
npx shadcn@latest add https://quinkit-ui.vercel.app/r/calendar.json