structyl

Calendar

stable

A standalone calendar for selecting dates.

Basic usage

June 2026
SMTWTFS

Examples

Range selection

Switch to mode="range" to allow selecting a start and end date.

June 2026
SMTWTFS

Selection modes

Calendar supports single, multiple and range selection plus date bounds.

May 2026
SMTWTFS
May 2026
SMTWTFS

Features

  • Single / range / multiple.
  • Keyboard navigation.

Installation

bash
pnpm dlx structyl add calendar

API Reference

Calendar

A standalone calendar supporting single, range and multiple selection.

PropTypeDefault
mode'single' | 'range' | 'multiple'

Selection mode.

'single'
selectedDate | Date[] | { from, to }

Controlled selection.

onSelect(value) => void

Called when the selection changes.

monthDate

Controlled displayed month.

minDateDate

Earliest selectable date.

maxDateDate

Latest selectable date.

weekStartsOnnumber

First day of the week (0 = Sunday).

0
showOutsideDaysboolean

Render days from adjacent months.

true
Calendar | structyl