Calendar

Month grid date picker. The month slides the way you travel, the selection glides between days and across months, and arrows, Home, End and Page keys all work. Data.

Open playground

November 2026

About

Calendar is a React component in the Data category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { Calendar } from "@ashutoshswamy/smoui" and set value, range, onChange among its 6 props.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { Calendar } from "@ashutoshswamy/smoui";

<Calendar value={date} onChange={setDate} min={new Date()} weekStart={1} />

Props 6

value / defaultValue

Controlled or initial selection.

Datenull
range

Optional range highlight for date-range fields.

{ from: Date; to?: Date | null }
onChange

Called when a day is picked.

(date: Date) => void
min / max

Earliest and latest selectable day.

Date
weekStart

0 starts the week on Sunday, 1 on Monday.

01default 0
locale

Month, weekday and date names.

stringdefault "en-US"