Skip to main content
A newer version of this page is available. .

DateTimeMask Class

Defines built-in patterns for Date-Time masks.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.1.dll

NuGet Package: DevExpress.Blazor

Declaration

public static class DateTimeMask

Remarks

Use the DateTimeMask class’s properties to apply a built-in Date-Time mask to a data editor. Each property is a wrapper for the corresponding format string. This technique simplifies the setup process for users who are not familiar with standard format strings.

<DxDateEdit @bind-Date="Date"
            Mask="@DateTimeMask.ShortDate" />

@code{
    DateTime Date { get; set; } = DateTime.Now;
}

Date-Time Masks - ShortDate

Note that pattern representation depends on the current culture. For example, the same input mask can specify different patterns in the U.S. and France. A culture-specific date-time format is defined by the DateTimeFormat property. Users can change the regional format in the SettingsTime & LanguageRegion system dialog. To change the culture programmatically, use the Culture property.

Inheritance

Object
DateTimeMask
See Also