blazor-devexpress-dot-blazor-dot-dxtimeedit-1-a9b3ed17.md
Specifies a mask pattern.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[Parameter]
public string Mask { get; set; }
| Type | Description |
|---|---|
| String |
A mask pattern string.
|
Use the Mask property to set up a Time Edit‘s mask pattern in code.
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 additional information on available mask patterns, refer to the following topic: Date and Time Mask Types.
<DxTimeEdit @bind-Time="Value"
Mask="hh:mm" />
@code{
DateTime Value { get; set; } = DateTime.Now;
}
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 following code snippet enables the Advancing caret mode.
<DxTimeEdit @bind-Time="Value"
Mask="hh:mm">
<DxDateTimeMaskProperties CaretMode="MaskCaretMode.Advancing" />
</DxTimeEdit>
@code{
DateTime Value { get; set; } = DateTime.Now;
}
See Also