Calendar

Une grille mensuelle pour choisir une date, une plage ou plusieurs dates, avec les touches de grille de dates WAI-ARIA, un minimum et un maximum, des jours désactivés et les noms de mois d’Intl.

Disponible pour
  • Angular: disponible
  • Vue: disponible
  • React: disponible
  • React Native: disponible

Utilisation

June 2026
Sun Mon Tue Wed Thu Fri Sat
June 2026
Mon Tue Wed Thu Fri Sat Sun

Importation

ts
import {
  SoneCalendarComponent,
} from "@surface-one/angular/calendar";

Référence de l’API

SoneCalendarComponentComposant

`<sone-calendar>` — a month grid to pick a date, a range or several dates (spartan/ui and shadcn/ui Calendar). The grid follows the WAI-ARIA date picker pattern: one Tab stop, the arrow keys move a day or a week, Home / End to the week's ends, PageUp / PageDown a month and, with Shift, a year; Enter or Space picks. Dates are ISO strings ("YYYY-MM-DD"); month and weekday names come from `Intl` in `locale`.

Sélecteur
sone-calendar
Inputs
NomType Par défaut
mode

What a pick does: take one date, close a range, or toggle a date of a list.

SoneCalendarMode"single"
valuebidirectionnel

The picked date(s) — `[(value)]`: "YYYY-MM-DD" or `null` (`single`), a list (`multiple`) or `{ start, end }` (`range`).

SoneCalendarValuenull
monthbidirectionnel

The month shown, "YYYY-MM" — `[(month)]`. Default: the picked date's, else today's.

string | nullnull
min

The earliest and latest date that can be picked ("YYYY-MM-DD").

string | nullnull
maxstring | nullnull
disabledDate

Refuses more dates: `(iso) => true` disables that day.

((iso: string) => boolean) | nullnull
weekStartsOn

The first day of the week: 0 = Sunday (the default) … 6 = Saturday.

SoneWeekday0
locale

A BCP 47 tag for the month and weekday names (default: the app's `LOCALE_ID`).

string | nullnull
today

Today, "YYYY-MM-DD". Default: the browser's date, read after the first render so a prerendered page hydrates without a mismatch.

string | nullnull
showOutsideDays

Shows the neighbour months' days that pad the first and last week.

booleantrue
disabledbooleanfalse
ariaLabel

Names the grid; by default the month caption does.

string | nullnull
autofocusDay

Marks the grid's Tab stop `data-autofocus` (a popover focuses it on open).

booleanfalse
previousMonthLabel—$localize`:Calendar previous month button:Previous month`
nextMonthLabel—$localize`:Calendar next month button:Next month`
Outputs
NomType
dateSelect

Fires on every pick, with the day picked.

string