Calendar

Siatka miesiąca do wyboru daty, zakresu lub kilku dat, z klawiszami siatki dat WAI-ARIA, datami min i max, wyłączonymi dniami i nazwami miesięcy z Intl.

Dostępny w
  • Angular: dostępny
  • Vue: dostępny
  • React: dostępny
  • React Native: dostępny

Użycie

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

Import

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

Dokumentacja API

SoneCalendarComponentKomponent

`<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`.

Selektor
sone-calendar
Wejścia
NazwaTyp Domyślnie
mode

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

SoneCalendarMode"single"
valuedwukierunkowe

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

SoneCalendarValuenull
monthdwukierunkowe

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`
Wyjścia
NazwaTyp
dateSelect

Fires on every pick, with the day picked.

string