Skip to content
Ballpoint

Calendar

A month on graph paper to pick from: one day, several, or a range. Today is ringed, the chosen day shaded in with the pen, a range hatched between its ends.

From shadcn/ui
October 2026
SuMoTuWeThFrSa

Installation

pnpm dlx shadcn@latest add @ballpoint/calendar

Usage

tsx
import { Calendar } from "@/components/ui/calendar"

const [date, setDate] = useState<Date | undefined>(new Date())

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

Examples

Range

Two months side by side, with the days between the ends hatched.

October 2026
SuMoTuWeThFrSa
November 2026
SuMoTuWeThFrSa

Multiple days

Each click adds a day or takes it away.

October 2026
SuMoTuWeThFrSa

3 days picked.

Disabled days

No weekends and nothing before the 5th; weeks start on Monday and days from other months are left out.

October 2026
MoTuWeThFrSaSu

Month and year dropdowns

For dates far from today, such as a date of birth.

SuMoTuWeThFrSa

Another language

Names of months and days come from Intl, so any locale works.

octobre 2026
lumamejevesadi

API reference

mode
default "single"
"single" | "multiple" | "range"

One day, many, or a start and an end. `selected` and `onSelect` take a Date, a Date[], or { from, to } to match.

selected / defaultSelected / onSelect
Date | Date[] | DateRange

The selection, controlled or not. Clicking the chosen day again clears a single selection.

numberOfMonths
default 1
number

Months shown side by side.

month / defaultMonth / onMonthChange
Date

Which month is showing.

startMonth / endMonth
Date

The first and last month it can be taken to.

disabled
boolean | (date) => boolean | Date | { before, after, from, to, dayOfWeek } | list

Days that can't be picked.

weekStartsOn
default 0
0 | 1 | 2 | 3 | 4 | 5 | 6

The first day of the week; 0 is Sunday.

showOutsideDays
default true
boolean

Show the days of neighbouring months that share a row.

captionLayout
default "label"
"label" | "dropdown"

The month and year in words, or two dropdowns to pick them.

locale
default "en-US"
string

A BCP 47 tag for the names of months and days.

seed
string | number

Pins the drawing.

Pen settings

The drawing also takes draw, roughness, weight and speed, as props or from the nearest InkProvider. What each one does.