Skip to content

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

NameTypeDefaultDescription
localestringundefinedFormatting locale (e.g. en-GB). By default it is derived from the library locale (ConfigProvider/installLocale, the locale option in Nuxt): enen-US.
min-value | CalendarDate | CalendarDateTime | ZonedDateTimeundefinedMinimum allowed date.
max-value | CalendarDate | CalendarDateTime | ZonedDateTimeundefinedMaximum allowed date.
week-starts-on0 | 1 | 2 | 3 | 4 | 5 | 6undefinedFirst day of the week: 0 is Sunday, 1 is Monday, and so on.
fixed-weeksbooleantrueAlways shows 6 weeks (stable grid height).
number-of-monthsnumber1Number of months shown at once.
multiplebooleanfalseAllows selecting multiple dates.
disabledbooleanfalseDisables interaction with the calendar.
readonlybooleanfalseRead-only: dates cannot be selected.
is-date-disabled((date: CalendarDate | CalendarDateTime | ZonedDateTime) => boolean)undefinedPredicate: return true to disable a specific date.
prev-month-labelstringundefinedAccessible name of the "previous month" button (defaults to the locale dictionary).
next-month-labelstringundefinedAccessible name of the "next month" button (defaults to the locale dictionary).
model-value | CalendarDate | CalendarDateTime | ZonedDateTime | (CalendarDate | CalendarDateTime | ZonedDateTime)[]undefinedSelected date (or an array with multiple). Two-way binding via v-model.

Events

NameSignatureDescription
update:modelValue( value: | CalendarDate | CalendarDateTime | ZonedDateTime | (CalendarDate | CalendarDateTime | ZonedDateTime)[] | undefined ) => voidEmitted when modelValue changes. Used for two-way binding (v-model).