Back to Devexpress

IDateEditSettings.WeekNumberRule Property

blazor-devexpress-dot-blazor-dot-idateeditsettings-ae701f73.md

latest2.8 KB
Original Source

IDateEditSettings.WeekNumberRule Property

Specifies the first week of the year.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(WeekNumberRule.Default)]
[Parameter]
WeekNumberRule WeekNumberRule { get; set; }

Property Value

TypeDefaultDescription
WeekNumberRuleDefault

An 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

Date editor displays week numbers on the left side of the drop-down calendar. Use the WeekNumberRule property to change the first week of the year at runtime. To specify the first week of the year in markup, use the DxDateEditSettings.WeekNumberRule property.

The IDateEditSettings interface allows you to get and customize settings of a date editor at runtime. You can get editor settings in the following ways:

csharp
void Grid_CustomizeFilterRowEditor(GridCustomizeFilterRowEditorEventArgs e) {
    if(e.EditSettings is IDateEditSettings dateEditSettings)
        dateEditSettings.WeekNumberRule = WeekNumberRule.FirstFullWeek;
}
csharp
void Grid_CustomizeDataRowEditor(GridCustomizeDataRowEditorEventArgs e) {
    if(e.EditSettings is IDateEditSettings dateEditSettings)
        dateEditSettings.WeekNumberRule = WeekNumberRule.FirstFullWeek;
}

See Also

IDateEditSettings Interface

IDateEditSettings Members

DevExpress.Blazor Namespace