Skip to content

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.

Basic

single · min 2019-09-10

2019年9月
月火水木金土日
2019-09-25

range · en-US · Sunday start

September 2019
SunMonTueWedThuFriSat
[ "2019-09-10", "2019-09-16" ]

weekends disabled

September 2019
MonTueWedThuFriSatSun

Usage ​

ts
import { BlessCalendar } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
rangeboolean—range mode: model is [start, end]
minstring—
maxstring—
weekStart0 | 110 = Sunday, 1 = Monday
localestring"ja-JP"
disabledDates((iso: string) => boolean)—
monthstring—month shown initially (YYYY-MM); defaults to model or today
modelValuestring | [string, string]—

Events

NamePayloadDescription
update:modelValue[value: string | [string, string] | undefined]

Released under the MIT License. Character names and artwork belong to their owners.