v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS
Calendar
A locale-aware calendar with a controlled display month.
Interactive preview
October 2026
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
Usage
import { Calendar } from "@devvy-ui/react";
<Calendar label="Choose a date" month={month} onMonthChange={setMonth} value={date} onValueChange={setDate} />API reference
Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:
| Prop | Type | Default | Description |
|---|---|---|---|
| month | string | required | Displayed YYYY-MM. |
| onMonthChange | (month: string) => void | required | Month navigation callback. |
| value / defaultValue | string | empty | Selected YYYY-MM-DD. |
| min / max | string | — | Inclusive civil-date bounds. |
| locale / weekStartsOn | string / 0 or 1 | en / 1 | Localized labels and week start. |
Accessibility & behavior
Platform Behavior & Guidelines
ISO civil dates use UTC arithmetic, independent of local time zones. Supply YYYY-MM explicitly for deterministic SSR. Arrows, Home/End and PageUp/PageDown navigate; Enter/Space selects.
Source ownership
Run npx @devvy-ui/cli init once in your React project, then add the source:
npx @devvy-ui/cli add calendarMake the source yours.
Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.
Calendar.tsxREACT / TSX
Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.