Appearance
Calendar
SCalendar is an interactive date grid with month navigation. It is fully keyboard accessible (arrows move between days, PageUp/PageDown between months), localized, and marks today, the selected date, and unavailable dates. The value is a DateValue from @internationalized/date; the navigation is built on SIcon. To pick a date in a form, use SDatePicker, which opens the calendar in a popover. Keep the value in a shallowRef, not a ref: a regular ref unwraps the date class, and type checking no longer recognizes it as a DateValue.
Basic usage
Limiting the date range
The minValue/maxValue props (or the isDateDisabled predicate) disable unavailable days.
Multiple dates
With the multiple prop the calendar lets you pick several dates; v-model is then an array of DateValue.
Multiple months
numberOfMonths shows several months side by side, which is handy for picking a range.
Week settings
weekStartsOn sets the first day of the week (0 is Sunday, 1 is Monday). fixedWeeks (true by default) keeps the grid at 6 rows; with false the height follows the month.
Unavailable dates
The isDateDisabled predicate disables arbitrary days. Here weekends are blocked.
States and upper bound
disabled turns the grid off completely, readonly keeps it view-only (no selection), and max-value caps the selection: dates after the maximum are unavailable.
API
Props
| Name | Type | Default | Description |
|---|---|---|---|
locale | string | undefined | Formatting locale (e.g. en-GB). By default it is derived from the library locale
(ConfigProvider/installLocale, the locale option in Nuxt): en → en-US. |
min-value | | CalendarDate
| CalendarDateTime
| ZonedDateTime | undefined | Minimum allowed date. |
max-value | | CalendarDate
| CalendarDateTime
| ZonedDateTime | undefined | Maximum allowed date. |
week-starts-on | 0 | 1 | 2 | 3 | 4 | 5 | 6 | undefined | First day of the week: 0 is Sunday, 1 is Monday, and so on. |
fixed-weeks | boolean | true | Always shows 6 weeks (stable grid height). |
number-of-months | number | 1 | Number of months shown at once. |
multiple | boolean | false | Allows selecting multiple dates. |
disabled | boolean | false | Disables interaction with the calendar. |
readonly | boolean | false | Read-only: dates cannot be selected. |
is-date-disabled | ((date: CalendarDate | CalendarDateTime | ZonedDateTime) => boolean) | undefined | Predicate: return true to disable a specific date. |
prev-month-label | string | undefined | Accessible name of the "previous month" button (defaults to the locale dictionary). |
next-month-label | string | undefined | Accessible name of the "next month" button (defaults to the locale dictionary). |
model-value | | CalendarDate
| CalendarDateTime
| ZonedDateTime
| (CalendarDate | CalendarDateTime | ZonedDateTime)[] | undefined | Selected date (or an array with multiple). Two-way binding via v-model. |
Events
| Name | Signature | Description |
|---|---|---|
update:modelValue | (
value:
| CalendarDate
| CalendarDateTime
| ZonedDateTime
| (CalendarDate | CalendarDateTime | ZonedDateTime)[]
| undefined
) => void | Emitted when modelValue changes. Used for two-way binding (v-model). |