Skip to main content

DxDateEdit<T>.Mask Property

Specifies a mask pattern.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.2.dll


public string Mask { get; set; }

Property Value

Type Description

A mask pattern string.


Use the Mask property to set up a Date Edit‘s mask pattern in code.

Date-Time Masks

Apply a Mask

To set up a mask, assign a desired mask pattern to the Mask property. You can use predefined mask patterns or standard date and time .NET formats to specify the mask. Note that display values depend on the current culture. For more information on available mask patterns, refer to the following topic: Date-Time Masks.

<DxDateEdit @bind-Date="Value"
            Mask="yyyy-MM-dd" />

    DateTime Value { get; set; } = DateTime.Now;

Date-Time Masks - Universal Sortable Date without Time

Configure Mask Properties

If required, configure mask settings (the current culture, caret mode, and so on). For this purpose, add the DxDateTimeMaskProperties component to the Date Edit markup and specify the component’s properties.

The code below enables the Advancing caret mode.

<DxDateEdit @bind-Date="Value"
    <DxDateTimeMaskProperties CaretMode="MaskCaretMode.Advancing" />

    DateTime Value { get; set; } = DateTime.Now;
See Also