Back to Devexpress

WeekNumberRule Enum

blazor-devexpress-dot-blazor-2059ccf5.md

latest2.4 KB
Original Source

WeekNumberRule Enum

Lists values that specify the first week of the year.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public enum WeekNumberRule

Members

NameDescription
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.

|

The following properties accept/return WeekNumberRule values:

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);
}

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

See Also

DevExpress.Blazor Namespace