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.

Layout & styling

Several months side by side, shared defaults through BitParams, colors, icons, sizes, Style & Class with the CSS variables, and right-to-left calendars.

Multiple months

MonthCount renders up to three consecutive months side by side, which browses a whole season at once - the arrow keys, the selection and the events carry on across them. Such a strip always draws six week rows, never draws the days of the adjacent months (each of them is a day of the pane beside it), and wraps onto the next line when it is given less width than it asks for. PagedNavigation makes the arrows move a whole page of months instead of one.
  • MonthCount defaults to 1 and is clamped to 1 - 3.
  • The strip reads as one calendar: only the first month has the back arrow (and, where the month picker is an overlay, the title that opens it), and only the last one has the forward arrow.
  • Picking a day of the second or third month does not page the view, and neither does a value set from code that is already on screen. OnMonthChange reports the first month of the strip.
  • PagedNavigation has no effect with a single month, and stops where a single step would have stopped at MinDate / MaxDate.


MonthCount = 2:
November 2026
S
M
T
W
T
F
S
December 2026
S
M
T
W
T
F
S
Selected: -


MonthCount = 3, paged navigation, month picker as an overlay:
S
M
T
W
T
F
S
December 2026
S
M
T
W
T
F
S
January 2027
S
M
T
W
T
F
S

Cascading parameters

BitParams carries a BitCalendarParams down to every calendar under it, so a page that shows several of them sets the week rules, the bounds or the culture once instead of at every calendar in it. What it carries is a default and not an override: a calendar that sets a parameter for itself keeps its own value, and only what it left unset is filled in from the cascade - which is what lets one calendar step out of the section it is in without the section having to know about it. Every parameter of the component is on the params object, and each of them is filled in on its own, so a calendar can take the week layout from the cascade and the month picker from its own markup.

Its members are the component's parameters as nullable properties, where null means "not set by the cascade". A value from the cascade counts as set on the calendar: a cascaded Color or Size wins over the CSS variables just as one written on the calendar would. Parameters takes a list of params objects, so one BitParams can carry the defaults of several kinds of component; a nested one adds to what its ancestors carry, unless it is Isolated.


Takes the week layout, the bounds and the highlighting from the cascade:
November 2026
#
M
T
W
T
F
S
S
44
45
46
47
48
49


So does this one, without repeating any of it:
November 2026
#
M
T
W
T
F
S
S
44
45
46
47
48
49


Its own bounds and no month picker, the cascaded week layout:
November 2026
#
M
T
W
T
F
S
S
44
45
46
47
48
49


Outside the cascade, and back to the defaults:
November 2026
S
M
T
W
T
F
S

Color

Color paints today, the highlighted current month, the event indicators and the AM/PM button that is in force, and tints the focus rings.

Left unset (the default) the calendar is primary, and the --bit-Calendar-* today, focus and event variables can restyle it; a Color that is set wins over them. An event's own Color wins over the calendar's for its dot and its row in the details dialog. The *Background colors are close to the page's own background, so they are shown on a contrasting surface below.


Primary:
November 2026
S
M
T
W
T
F
S


Secondary:
November 2026
S
M
T
W
T
F
S


Tertiary:
November 2026
S
M
T
W
T
F
S


Info:
November 2026
S
M
T
W
T
F
S


Success:
November 2026
S
M
T
W
T
F
S


Warning:
November 2026
S
M
T
W
T
F
S


SevereWarning:
November 2026
S
M
T
W
T
F
S


Error:
November 2026
S
M
T
W
T
F
S


PrimaryBackground:
November 2026
S
M
T
W
T
F
S


SecondaryBackground:
November 2026
S
M
T
W
T
F
S


TertiaryBackground:
November 2026
S
M
T
W
T
F
S


PrimaryForeground:
November 2026
S
M
T
W
T
F
S


SecondaryForeground:
November 2026
S
M
T
W
T
F
S


TertiaryForeground:
November 2026
S
M
T
W
T
F
S


PrimaryBorder:
November 2026
S
M
T
W
T
F
S


SecondaryBorder:
November 2026
S
M
T
W
T
F
S


TertiaryBorder:
November 2026
S
M
T
W
T
F
S

External Icons

Every icon of the calendar has an *Icon parameter taking a BitIconInfo from an external library (BitIconInfo.Fa(...), BitIconInfo.Bi(...), BitIconInfo.Css(...)), and an *IconName one taking a built-in Fluent icon. The Icon form wins when both are set.
  • The icons: GoToToday, PrevMonthNav / NextMonthNav (day grid), PrevYearNav / NextYearNav (month grid), PrevYearRangeNav / NextYearRangeNav (year grid), ShowTimePicker / HideTimePicker (the overlay time picker's toggles), NowButton, and TimePickerIncreaseHour / TimePickerDecreaseHour / TimePickerIncreaseMinute / TimePickerDecreaseMinute.
  • The calendar does not load an external library: add its stylesheet to the page yourself, as this section does with a <link>.
  • An icon only changes what a button shows; its name and tooltip still come from the matching *Title parameter.


FontAwesome icons:

November 2026
S
M
T
W
T
F
S



Bootstrap icons (with ShowTimePicker):

S
M
T
W
T
F
S

Size

Size scales the cells and their text together, so the whole calendar keeps its proportions. The smallest cell still clears the 24 px minimum pointer target.

Left unset (the default) the calendar is medium, and --bit-Calendar-day-size / --bit-Calendar-day-font-size can resize it; a Size that is set wins over them. For a size between the three, leave Size unset and use the variables (see the Style & Class section).


Small:
November 2026
#
S
M
T
W
T
F
S
44
45
46
47
48


Medium (the default):
November 2026
#
S
M
T
W
T
F
S
44
45
46
47
48


Large:
November 2026
#
S
M
T
W
T
F
S
44
45
46
47
48

Style & Class

Style and Class land on the root, while Styles and Classes reach every part of the calendar on its own - see BitCalendarClassStyles. Prefer Classes when your CSS owns states such as hover and focus, which inline styles cannot express.
  • A day has a part for every state - SelectedDayButton, TodayDayButton, HighlightedDayButton - added on top of DayButton. In Styles, the DayButton style comes last on every day, so it wins over a state's style for the same property.
  • The event dialog has its own parts (EventModalOverlay, EventItem, EventItemTitle, ...), and the header and footer templates are wrapped in Header and Footer.
  • A class from a scoped .razor.css stylesheet reaches these parts only through ::deep, from a plain element of your own around the calendar.


Component's Style & Class:

November 2026
S
M
T
W
T
F
S
November 2026
S
M
T
W
T
F
S



Styles & Classes:

S
M
T
W
T
F
S
November 2026
S
M
T
W
T
F
S



The calendar also reads a set of CSS variables off its root. They inherit, so a value on :root or any ancestor re-skins every calendar below it, and one on the Style of an instance re-skins that one and any calendar nested in it. They restyle the default, not a choice: an explicit Color or Size wins over the variables for what it sets.

CSS variables:

A filled selection and a square today:
Selected date 11/30/2026
November 2026
S
M
T
W
T
F
S


Roomier cells, rounded days, tinted week numbers:
November 2026
#
S
M
T
W
T
F
S
44
45
46
47
48


Set once on an ancestor, inherited by every calendar inside it:

November 2026
S
M
T
W
T
F
S

RTL

Dir Rtl mirrors the calendar, and the left and right arrow keys swap with it. A culture that reads right to left turns it on by itself.

Left unset, Dir follows the direction of the page around the calendar (or of its culture, as above), and BitDir.Auto takes the direction of its content. An explicit Dir wins over the culture, so BitDir.Ltr keeps a Persian calendar left to right. Only the horizontal arrows are mirrored: the up and down arrows and the page keys mean the same in both directions.


#
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.