API reference
@salmonui/calendars/calendar
30 exported symbols: 2 components, 5 functions, 14 interfaces and 9 types. Each name links its page with the signature, docs and members.
import { … } from '@salmonui/calendars/calendar';Components
CalendarAn inline calendar: one month grid (or year / decade grid) with single or multiple day selection (selectionMode). WAI-ARIA APG date grid.RangeCalendarAn inline calendar that selects a start and an end date.
Functions
getRangeDaysInclusive number of days of a range; 0 for null.toDateThe Date (instant) of a plain date or date-time: its wall time in timeZone (DST resolved like Temporal 'compatible'), else in the host zone. An invalid value o…toPlainDateNormalizes a DateInput (an invalid input is null; never throws).toPlainDateTimeNormalizes a DateTimeInput; a date-only input is midnight.toPlainTimeNormalizes a TimeInput; a date-time input keeps its time part.
Interfaces
CalendarBasePropsProps shared by Calendar and RangeCalendar.CalendarChangeDetailsSecond argument of the change callbacks.CalendarDayContextState of one rendered day cell, passed to renderDay and getDayProps.CalendarDayPropsProps getDayProps may add to a day cell.CalendarLocaleTextUser-visible strings of Calendar and RangeCalendar (Data Grid localeText message format).CalendarMultiplePropsCalendarSinglePropsDateRangeAn inclusive range of two values.PlainDateA frozen ISO calendar date. String(date) and JSON.stringify give YYYY-MM-DD.PlainDateLikeAnything with ISO calendar date fields (Temporal.PlainDate included). Month is 1-12.PlainDateTimeA frozen date and wall-clock time. String(value) gives YYYY-MM-DDTHH:mm:ss.PlainTimeA frozen wall-clock time. String(time) gives HH:mm:ss (.sss when milliseconds are set).PlainTimeLikeAnything with wall-clock time fields (Temporal.PlainTime included).RangeCalendarProps
Types
CalendarGranularityWhat a calendar selects: days, months (day 1) or years (January 1).CalendarPropsCalendarViewNavigation view of a calendar: days of a month, months of a year, years of a decade.DateInputA date value: fields, a Date (an instant, read in the time zone) or an ISO 8601 string ('2026-11-23').DateTimeInputA date-time value: fields, a Date or an ISO date-time string ('2026-11-23T14:30').PlainDateTimeLikeTimeInputA time value: fields, a Date or an ISO time string ('14:30', '14:30:05').WeekRuleWhich week of January is week 1.WeekdayFormat