Week Number in Blazor DateTime Picker

27 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>

Blazor DateTime Picker with week numbers

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 Locale and the first day of the week (FirstDayOfWeek) influence week numbering. By default, the Blazor DateTime Picker uses the culture’s settings unless overridden.

Blazor DateTime Picker displays Week Rule of FirstDay

Blazor DateTime Picker displays Week Rule of FirstFullWeek

Blazor DateTime Picker displays Week Rule of FirstFourDayWeek

See also