Example of Disabled Dates in Blazor Calendar Component
In the following example, all the weekends (Saturday and Sunday) of a month are disabled, and these dates are restricted to set or select in the Calendar.
April 2025
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
30 | 31 | 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 | 1 | 2 | 3 |
Disabled Dates example demonstrates, how to disable specific dates in the Calendar by using the OnRenderDayCell event. This event gets triggered on each day cell element creation that allows you to customize or disable the specific dates in the Calendar. Here, the weekend dates are disabled by using OnRenderDayCell.