Calm motion: animations on this site only fade, with no movement
RangeCalendar
Paint the days you are free, or busy
A month where the days are chosen by dragging across them, again and again, to build up a set: availability, days off, blackout dates, opening days. The value is every chosen day, not one range. For one date, use DatePicker. For a single range from one date to another, use Calendar with range.
Availability
MonTueWedThuFriSatSun
4 days in 2 blocks
Arrow keys move, Space toggles a day, hold Shift and press arrows to paint, Page Up and Down change month.v-modelis the chosen days as sortedYYYY-MM-DDstrings. Drag across days to add them. A drag that starts on a chosen day removes instead (it shows a dashed outline while you do). A plain click toggles one day. Nothing changes until you let go.- Keyboard: one day is the tab stop. The arrow keys move by day and week. Home and End go to the ends of the week. Page Up and Page Down change the month. Space or Enter toggles the day. Hold Shift while you press the arrow keys to paint as you go: the first day decides whether the stroke adds or removes. Choices are announced.
min,maxanddisabledDatesmake days unpaintable (a drag skips them, and a drag that starts on them does nothing). The footer says "5 days in 2 blocks" and has Clear all.#summary="{ blocks }"writes your own, andchangegives the blocks as{ start, end, count }.- The grid is a
role="grid"witharia-multiselectable. Each day is named in full ("Friday, May 1, 2026").localeandweekStartset the names and the first column.labelstranslates the wording. The component marks today after mount, so a server-rendered page agrees.
Usage
ts
import { BlessRangeCalendar } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
weekStart | 0 | 1 | 1 | 0 = Sunday, 1 = Monday |
locale | string | "en" | |
min | string | — | |
max | string | — | |
disabledDates | ((iso: string) => boolean) | — | |
month | string | — | month shown first (YYYY-MM); defaults to the first chosen day, else this month |
label | string | "Days" | |
labels | Partial<{ prev: string; next: string; clear: string; summary: (days: number, blocks: number) => string; selected: (day: string) => string; cleared: (day: string) => string; hint: string; }> | — | |
modelValue | string[] | [] | every chosen day, as sorted `YYYY-MM-DD` |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: string[]] | |
change | [blocks: DayBlock[]] |
Slots
| Name | Scope | Description |
|---|---|---|
summary | { blocks: DayBlock[]; } |