Back to Devexpress

DxCalendar<T>.WeekNumberRule Property

blazor-devexpress-dot-blazor-dot-dxcalendar-1-8a3a6ded.md

latest1.8 KB
Original Source

DxCalendar<T>.WeekNumberRule Property

Specifies the first week of the year.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public WeekNumberRule WeekNumberRule { get; set; }

Property Value

TypeDescription
WeekNumberRule

A WeekNumberRule enumeration value.

|

Available values:

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.

|

Remarks

Calendar displays week numbers on the left-hand side. The WeekNumberRule defines the first week of the year.

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

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

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

See Also

DxCalendar<T> Class

DxCalendar<T> Members

DevExpress.Blazor Namespace