DxDateEditSettings.Mask Property
Specifies a mask pattern.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[DefaultValue(null)]
[Parameter]
public string Mask { get; set; }
Property Value
Type | Default | Description |
---|---|---|
String | null | A mask pattern. |
Remarks
The date editor supports date-time and date-time offset masks.
Choose a mask from a number of predefined patterns or use a standard or custom format string. Assign a mask pattern to the Mask
property to apply a mask to the date editor. Add the DxDateTimeMaskProperties or DxDateTimeOffsetMaskProperties component to the editor’s markup to customize mask-related settings:
<DxGrid Data="@employees" PageSize="6" EditMode="GridEditMode.EditRow">
<Columns>
<DxGridCommandColumn />
<DxGridDataColumn FieldName="FirstName" />
<DxGridDataColumn FieldName="LastName" />
<DxGridDataColumn FieldName="HireDate" >
<EditSettings>
<DxDateEditSettings Mask="@DateTimeMask.ShortDate" DisplayFormat="D">
<MaskProperties>
<DxDateTimeMaskProperties UpdateNextSectionOnCycleChange="true" />
</MaskProperties>
</DxDateEditSettings>
</EditSettings>
</DxGridDataColumn>
<DxGridDataColumn FieldName="Email" />
</Columns>
</DxGrid>
@code {
Employee[]? employees;
protected override async Task OnInitializedAsync() {
employees = await EmployeeData.GetData();
}
}
The appearance of a mask pattern depends on the client computer’s culture. Users can change the regional format in the Settings → Time & Language → Region system dialog. To change the culture programmatically, use the Culture property.
To specify the mask at runtime, use the IDateEditSettings.Mask property instead.