Skip to main content

DateTimeMask Class

Defines built-in patterns for Date-Time masks.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.2.dll


public static class DateTimeMask


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" />

    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.


See Also