Blazor Toolkit Calendar Component
The Blazor Calendar component provides an intuitive interface for date selection and navigation. It offers a comprehensive set of features including multiple view modes, multi-selection, week number and accessibility support for building robust date-picking experiences.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 28 | 29 | 30 | 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 | 1 |
Year And Decade Views
| Jan | Feb | Mar | Apr |
| May | Jun | Jul | Aug |
| Sep | Oct | Nov | Dec |
| 2019 | 2020 | 2021 | 2022 |
| 2023 | 2024 | 2025 | 2026 |
| 2027 | 2028 | 2029 | 2030 |
Date Range
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 28 | 29 | 30 | 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 | 1 |
Multi Selection
The IsMultiSelection property enable users to select multiple non-consecutive dates. This is useful for scheduling events, selecting date ranges, or marking multiple important dates.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 28 | 29 | 30 | 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 | 1 |
Special Dates
Customize specific dates in a Blazor Calendar by handling the DayCellRendering event. This event fires for each day cell as it is created, allowing the addition of CSS classes and, if needed, disabling particular dates. The following example highlights two sets of days in the current month with custom styles using the personal-appointment and official-appointment classes, and updates a label on selection via ValueChange event.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 28 | 29 | 30 | 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 | 1 |
Islamic Calendar
The Blazor Calendar component supports displaying the Islamic (Hijri) Calendar. The Hijri Calendar is a lunar Calendar with 12 months and 354 or 355 days per year. To render the Islamic Calendar, set the CalendarMode property to CalendarType.Islamic. This switches the Calendar system used for display and selection.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 28 | 29 | 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 | 1 | 2 | 3 | 4 |
Week Number
The WeekNumber property is used to display week numbers alongside the Calendar dates. This feature is particularly useful for business applications that reference ISO week numbers for planning and reporting purposes. Configure how the first week of the year is determined by using the WeekRule property (aligned with .NET CalendarWeekRule semantics).
| S | M | T | W | T | F | S | |
|---|---|---|---|---|---|---|---|
| 27 | 28 | 29 | 30 | 1 | 2 | 3 | 4 |
| 28 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 29 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 30 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 31 | 26 | 27 | 28 | 29 | 30 | 31 | 1 |
First Day Of Week
The Calendar provides an option to change the first day of the week by using the FirstDayOfWeek property. Generally, the day of the week starts from 0 (Sunday) and ends with 6 (Saturday).
| T | W | T | F | S | S | M | |
|---|---|---|---|---|---|---|---|
| 27 | 30 | 1 | 2 | 3 | 4 | 5 | 6 |
| 28 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 29 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 30 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 31 | 28 | 29 | 30 | 31 | 1 | 2 | 3 |