Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

WeekNumberRule Enum

Lists values that specify the first week of the year.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public enum WeekNumberRule

#Members

Name Description
Default

Specified by the system’s CalendarWeekRule property.

FirstDay

The week that contains the 1st of January.

FirstFullWeek

The first full week.

FirstFourDayWeek

The first week that has a majority (4 or more) of its days in January.

#Remarks

Calendar and Date Edit display week numbers on the left side of the calendar. The WeekNumberRule property defines the first week of the year.

The following code snippet sets the WeekNumberRule property to WeekNumberRule.FirstFullWeek.

Razor
<DxCalendar @bind-SelectedDate="@DateTimeValue" 
            WeekNumberRule="WeekNumberRule.FirstFullWeek">
</DxCalendar>

@code {
    DateTime DateTimeValue { get; set; } = new DateTime(2020,01,01);
}

Calendar - Week Number Rule

To specify the first day of a week in the calendar, use the DxCalendar.FirstDayOfWeek and DxDateEdit.FirstDayOfWeek properties.

See Also