Skip to content

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.

Styled with CSS Tailwind

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

SMTWTFS
1234567
891011121314
15161718192021
22232425262728
2930

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

SMTWTFS
1234567
891011121314
15161718192021
22232425262728
2930
SMTWTFS
12345
6789101112
13141516171819
20212223242526
2728293031

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

SunMonTueWedThuFriSat
1234567
891011121314
15161718192021
22232425262728
2930

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

MDMDFSS
1
2345678
9101112131415
16171819202122
23242526272829
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

SMTWTFS
1234567
891011121314
15161718192021
22232425262728
2930

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.

November 2026

SMTWTFS
1234567
891011121314
15161718192021
22232425262728
2930

Check-in is from 3 pm.

An unhandled error has occurred. Reload 🗙