Calendar
Month grid
An inline month you can pick a day — or a range — from. The model is an ISO date string ("2019-09-25"), or [start, end] in range mode; the second click closes the range and hovering previews it. locale drives the month name and weekday initials through Intl; weekStart is 1 (Monday) by default, 0 for Sunday. min, max and disabledDates(iso) strike out what can't be picked; month (YYYY-MM) sets the month shown before anything is selected.
Keyboard: arrows move a day or a week (← / → follow reading direction in RTL), Home / End to the week's ends, PageUp / PageDown a month, Enter or Space picks. One cell is in the tab order at a time — the focused day — so the grid is a single stop. The month heading is polite-live, so paging is announced.
For a date field — this in a popover, or the native picker on touch — use DatePicker.
single · min 2019-09-10
range · en-US · Sunday start
weekends disabled
Usage
import { BlessCalendar } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
range | boolean | — | range mode: model is [start, end] |
min | string | — | |
max | string | — | |
weekStart | 0 | 1 | 1 | 0 = Sunday, 1 = Monday |
locale | string | "ja-JP" | |
disabledDates | ((iso: string) => boolean) | — | |
month | string | — | month shown initially (YYYY-MM); defaults to model or today |
modelValue | string | [string, string] | — |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: string | [string, string] | undefined] |