DateTimeMask Class
Defines built-in patterns for Date-Time masks.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v21.2.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;
}
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 Settings → Time & Language → Region system dialog. To change the culture programmatically, use the Culture property.