Prodular UI

Calendar

A month grid for picking a date or a date range, built on React DayPicker.

npx prodular-ui add calendar

Single date

Past dates are disabled. Today has a small dot.

October 2026

Range

Two months for ranges that cross a month end.

October 2026
November 2026

Anatomy

<Calendar mode="single" selected={date} onSelect={setDate} />

Guidance

Use it when

  • Picking a due date, a booking date or a reporting range where the day of the week matters.

Avoid

  • Dates people know by heart, such as a birthday, as the only input. Offer a text input too or use dropdowns.
  • Time of day. Pair it with an Input or Select for time.

Rules for AI agents

Published in llms-full.txt, the registry and the MCP server, so coding agents follow them when they build with this component.

  • Set mode to single, multiple or range and control selected with onSelect.
  • Disable dates people cannot pick with disabled (for example { before: today }) rather than validating afterwards.
  • Use numberOfMonths={2} for ranges.
  • In a popover, render it without a border. Standalone, give it rounded-xl border bg-card shadow-xs.

API

Calendar

PropTypeDefaultDescription
mode"single" | "multiple" | "range"Selection behaviour.
selected / onSelectDate | Date[] | DateRangeControlled selection.
disabledMatcher | Matcher[]Dates that cannot be picked.
captionLayout"label" | "dropdown""label"Static caption or month and year dropdowns.
numberOfMonthsnumber1Months shown side by side.
buttonVariantButton variant"ghost"Style of the previous and next buttons.

Installation

The Prodular UI CLI adds the source to components/ui with everything it depends on. In a project that already uses shadcn/ui, the shadcn CLI installs it from the Prodular registry too. See Installation for the first setup.

npx prodular-ui add calendar# or, with the registry in components.jsonnpx shadcn@latest add @prodular/calendar