Skip to content

Inputs

Calendar

Bit.BlazorUI

BitCalendar is a fully-featured inline calendar for browsing and selecting a single date, or a date and time when the built-in time picker is enabled. It offers day, month and year grids, day events with details, and flexible day/week rules such as disabled and highlighted dates, a custom first day of week and week numbers. It works with any culture and time zone, including right-to-left and non-Gregorian calendars, and every grid follows the WAI-ARIA grid pattern for the keyboard.

Culture & accessibility

Cultures and their calendar systems, the time zone the value is read and written in, form validation, and keyboard and screen-reader support.

Culture

The calendar reads the month and day names, the first day of the week, the date format, the AM/PM designators and the calendar system itself off its Culture, defaulting to the culture of the app. A non-Gregorian calendar (Persian, Hebrew - including its thirteen-month leap years) needs nothing else. See our CultureInfoHelper(opens in a new tab) for how such a culture is built.
  • The default is CultureInfo.CurrentUICulture (not CurrentCulture). The calendar system is the culture's DateTimeFormat.Calendar.
  • Only the display changes: the value is still a DateTimeOffset, and the months, years and day numbers the calendar shows are those of the culture's calendar.
  • DateFormat (default: the culture's short date pattern) is how the selected date is written as text - what a screen reader is told on a selection, the heading of the event dialog, and the value's text form in a form.
  • A culture written right to left lays the calendar out right to left when Dir is not set (see RTL).
  • The button names and tooltips are not translated by the culture: set the *Title parameters (as GoToTodayTitle below) and EventTimeFromText / EventTimeUntilText yourself.
  • A date outside the range the culture's calendar supports (.NET's Hebrew calendar starts in 1583) opens the view on the nearest date it does support.


fa-IR with Farsi names:

آذر 1405
ش
ی
د
س
چ
پ
ج


fa-IR with Fingilish names:

Azar 1405
S
Y
D
S
C
P
J

TimeZone

TimeZone is the zone the days and the time picker are read and written in, defaulting to the local one. The available zone data differs between runtimes - it depends on the OS and on project settings such as InvariantTimezone (more info(opens in a new tab)).
  • The default is TimeZoneInfo.Local: the browser's zone in WebAssembly, but the server's zone in an app rendered on the server (Blazor Server, prerendering), where a user's own zone has to be passed in.
  • An incoming value is converted into the zone before it is shown, so a value carrying another offset can land on a different day than its own date part says. A picked value carries the offset the zone has on that day, daylight saving time included.
  • Today, the bounds, DisabledDates and HighlightedDates are all read in the same zone. The Date of an event is not converted.


Local (the default):

S
M
T
W
T
F
S

Selected date:




"Dateline Standard Time":

S
M
T
W
T
F
S

Selected date:

Validation

Inside an EditForm the calendar validates like any other input. A rejected value draws a rule around the control and turns its focus ring red, and the day grid reports aria-invalid.
  • The rules come from the model: here the [Required] attribute on the bound property, checked by the DataAnnotationsValidator. Show the message with a ValidationMessage of your own; the calendar draws none.
  • The Required parameter does not validate. It describes the day grid as required to a screen reader, once as the focus enters it (no single day carries aria-required), and a Disabled or ReadOnly calendar is never described as required.
  • The bounds and the disabled days are not validation rules: a value outside them that comes from the model is not reported invalid, so add a rule of your own when that matters.
  • InvalidErrorMessage replaces the default "The {field} field is not valid." message, which is only produced when a value given as text cannot be read with the DateFormat; DisplayName names the field in that default message.


November 2026
S
M
T
W
T
F
S


Accessibility

Every grid - days, months and years - follows the WAI-ARIA grid pattern: one cell is in the tab sequence and the arrow keys move the focus between the rest.

  • ← / →: previous/next cell, mirrored in right-to-left
  • ↑ / ↓: one row up/down - a week in the day grid, four cells in the others
  • Home / End: first/last cell of the week, of the year, of the range
  • PageUp / PageDown: previous/next month in the day grid, year in the month grid, year range in the year grid
  • Shift+PageUp / Shift+PageDown: same day of the previous/next year
  • Enter / Space: activate the focused cell
  • Escape: leave the event details dialog, the year grid, or a picker laid over the day grid
In the time picker the arrow keys move the hour and the minute by one step of the grid and PageUp / PageDown do the same from anywhere in the field.

Crossing a month, year or range boundary navigates the calendar and keeps the focus on the cell, and disabled cells are skipped. Beyond that: AriaLabel names the whole calendar for a screen reader, each day is announced with its full date and its events, today and the current month and year carry aria-current="date", and every button - the arrows, the spin buttons, the AM/PM pair - has a name and a state of its own, all of them overridable through the *Title parameters.

  • A calendar given an AriaLabel (or an aria-labelledby) becomes a named group, which tells two calendars on one page apart.
  • A selection is announced through a polite live region with SelectedDateAriaAtomic (default "Selected date {0}", {0} being the date in the DateFormat); clearing the value announces nothing.
  • A day that opens the event dialog reports aria-haspopup="dialog". The dialog is modal: it keeps Tab inside it and gives the focus back to its day when it closes.
  • The *Title parameters with placeholders are format strings: {0} is the month title in MonthPickerToggleTitle, the year in YearPickerToggleTitle, GoToPrevYearTitle and GoToNextYearTitle, and {0} / {1} are the first and last years of a range in the year-range titles.
  • FocusAsync(), called through a @ref, puts the focus on the day of the day grid that is in the tab sequence, or on the month, the year or the hour input when another picker is on screen.


#
S
M
T
W
T
F
S
44
45
46
47
48

Feedback

Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.