Calendar
Month grids to pick a date, a range or several dates from — the WAI-ARIA date grid with one tab stop, full keyboard support, limits, unavailable dates and the reader's own calendar.
Single date
BitBhCalendarGrid is a <table role="grid"> named by the heading; each date is a
gridcell named by the full date, with aria-selected and aria-current="date"
on today. The grid is one tab stop: ← / → move a day, ↑ / ↓ a week, PageUp / PageDown a month
(Shift: a year), Home / End to the ends of the week, Enter or
Space select. Moving past the month shows the next one. The previous / next buttons keep the focus and
announce the month they show.
November 2026
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 |
Selected: Sunday, November 22, 2026
A range across two months
@bind-Range makes it a range calendar: the first press sets one end, the range follows the pointer
and the focus (data-highlighted) until the second press, and Escape drops a half-picked
range. VisibleMonths="2" with a grid per Offset shows two months; the buttons page by two.
Booked nights are IsDateUnavailable: focusable and announced, not selectable — and a range can't span
them (AllowsNonContiguousRanges lifts that).
November – December 2026
November 2026
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 |
December 2026
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 |
Stay: none
Limits, weekends and outside days
Min / Max disable the dates outside them (aria-disabled, data-disabled,
not focusable): the arrow keys stop at the limits and the buttons are aria-disabled at the last month.
Weekends are unavailable here (data-unavailable). ShowOutsideDays fills the first and last
weeks with the neighbouring months' dates (data-outside-month), hidden from assistive technology.
November 2026
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 |
Delivery: none
Cultures, calendars and right to left
Culture sets the month and day names, the first day of the week and the calendar itself: the German
week starts on Monday; the Persian culture shows the Persian calendar's months (its year starts in March) and, in a
right-to-left page, ← / → are mirrored. The value is a DateOnly either way. (This WebAssembly demo
runs without ICU, where the Persian calendar isn't available.)
November 2026
| M | D | M | D | F | S | S |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
Value: 2026-11-22
Several dates
@bind-Values selects any number of dates; each press toggles one. The grid is
aria-multiselectable. A cell's Template receives the day's state — used here to mark
the dates that already have a shift.
November 2026
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 |
Shifts: none
In a form
In a BitBhField the calendar's group is labelled by BitBhLabel and described by
BitBhDescription and, once invalid, BitBhErrorMessage; clicking the label focuses the
focused date. @bind-Value takes part in EditForm validation, and Name posts a
hidden yyyy-MM-dd input.