Week Number in Blazor DateTimePicker Component
6 Aug 20261 minute to read
Display the week index in the calendar’s left column by setting WeekNumber="true" (default is false). The Width is increased to make room for the new column.
@using Syncfusion.Blazor.Calendars
<SfDateTimePicker TValue="DateTime?" Width="250px" WeekNumber="true"></SfDateTimePicker>
Week Rule
Configure how the first week of the year is determined using the WeekRule property. This setting controls how week numbers roll over at the start of the year. The property accepts System.Globalization.CalendarWeekRule values; the default is FirstDay. The following values correspond to .NET’s CalendarWeekRule:
| Value | Description |
|---|---|
FirstDay |
The first week starts on the first day of the year; subsequent weeks are numbered 1, 2, 3, and so on. |
FirstFullWeek |
The first full week of the year is week 1; days before the first full week are counted as the last week (52 or 53) of the previous year. |
FirstFourDayWeek |
The first week with at least four days in the new year is week 1; otherwise, that week is counted as the last week (52 or 53) of the previous year. |
<SfDateTimePicker TValue="DateTime?" WeekNumber="true" WeekRule="CalendarWeekRule.FirstFourDayWeek" FirstDayOfWeek="DayOfWeek.Monday"></SfDateTimePicker>NOTE
The
Localeand the first day of the week (FirstDayOfWeek) influence week numbering. By default, the DateTimePicker uses the culture’s settings unless overridden.


