Calendar

Markdown

Pick a date or a range, in any language, limited to the dates you allow.

Use it for
Picking a date or range inline, with availability rules.
Not for
A compact field in a form. Try DateRangePicker.

Calendar preview

Loading example…

Installation

npm install @stackunseen/ui
import { Calendar } from '@stackunseen/ui/application';
Styles: @stackunseen/ui/styles.css and @stackunseen/ui/application.css

Usage and props

Import this component from @stackunseen/ui/application. Load @stackunseen/ui/styles.css first, then @stackunseen/ui/application.css.

Use date-only YYYY-MM-DD strings. Your app owns both the selected date or range and the displayed month. Pass dates as YYYY-MM-DD, plus the month to show and today’s date from your app. locale formats the dates; labels translates the rest of the text.

mode'single' | 'range' (optional)
Select one date by default, or a start/end range.
valueDateOnly | null, or DateRange
Controlled selection matching mode.
onValueChange(selection) => void (optional)
Requests a selection. An earlier range end restarts the range; a disabled interior day blocks completion.
monthDateOnly
Any valid date in the displayed month.
onMonthChange(month: DateOnly) => void
Requests the first day of the next displayed month.
localestring
Date and weekday formatting locale. Use labels to translate interface wording.
todayDateOnly (optional)
Today’s date from your app. The browser’s clock and time zone aren’t used.
disabledDatesreadonly DateOnly[] (optional)
Unavailable dates. min and max provide inclusive date bounds.
How state and callbacks work
All props

Loading…

For your coding agent

Give the agent this page instead of a screenshot. The prompt wraps the page with the install and import lines and the rule that your server, not a click, completes an action.

Contract
value · onValueChange? · month · onMonthChange · locale · mode?
Keeps honest
Pass dates as YYYY-MM-DD, plus the month to show and today’s date from your app. locale formats the dates; labels translates the rest of the text.
MCP
read_component "Calendar" on the docs endpoint
Open the Markdown file

Keyboard and customization

Keyboard

Arrow keys move by day or week, Home/End by week and Page Up/Down by month. Enter or Space selects an available day.

Customization

Change shared colors, spacing, corners and icons with the theme. Use the component's supported props to adapt its content and layout. Customization guide and Theme Studio