Calendar

A month grid with single, multiple and range selection, locales and date constraints.

Sun
Mon
Tue
Wed
Thu
Fri
Sat

Pick a date

Import#

import { Calendar } from "astralis-ui";
// Calendar.Header, .PrevTrigger, .ViewTrigger, .NextTrigger,
// .Weekdays, .Grid, .Cell

Range selection#

selectionMode="range" returns { start, end }; firstDayOfWeek={1} starts weeks on Monday, and weekday names follow the locale.

Mon
Tue
Wed
Thu
Fri
Sat
Sun

Props#

PropTypeDefaultDescription
selectionMode"single" | "multiple" | "range""single"What a click selects.
value / defaultValue / onValueChangeDate | Date[] | { start, end } | nullControlled / uncontrolled API, shaped by the mode.
defaultMonthDatetodayInitially visible month.
localestring"en-US"Intl locale for month/weekday names.
firstDayOfWeek0 – 600 = Sunday, 1 = Monday…
minDate / maxDate / isDateUnavailableDate / Date / (date) => booleanSelection constraints.
showOutsideDaysbooleantrueRender the adjacent months' spill-over days.
size"sm" | "md" | "lg""md"Cell size.

Keyboard#

With focus on the day grid:

KeyAction
/ Previous / next day
/ Previous / next week
Home / EndStart / end of the week
PageUp / PageDownPrevious / next month (same day)
Enter / SpaceSelect the focused day

Moving past a month boundary flips the visible month and keeps focus on the day — no extra keystrokes needed.

Accessibility#

Every day cell is a real button with a full-date aria-label; the previous and next triggers are labeled, and unavailable dates use the native disabled attribute.