DxTimeSpanMaskProperties.HideAllZeroValueOptionalSections Property
Specifies whether a time span mask hides all zero value optional sections.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v25.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[DefaultValue(false)]
[Parameter]
public bool HideAllZeroValueOptionalSections { get; set; }
Property Value
| Type | Default | Description |
|---|---|---|
| Boolean | false |
|
Remarks
Enclose mask sections in square brackets to mark them as optional. The editor hides an optional zero value section if it is the first or last visible section. Set the HideAllZeroValueOptionalSections property to true to hide all zero value optional sections:
<DxMaskedInput @bind-Value="@time"
Mask="[dd DD ]hh HH[ mm MM][ ss SS][nnn NN]">
<DxTimeSpanMaskProperties HideAllZeroValueOptionalSections=true />
</DxMaskedInput>
@code {
TimeSpan time { get; set; } = new TimeSpan(5, 16, 0, 15, 0);
}

This setting can affect the editor’s value readability. In the following code snippet, the editor hides the minutes section. As a result, the editor value is short but unclear.
<DxMaskedInput @bind-Value="@time"
Mask="[dd.]hh[:mm][:ss][:fff]">
<DxTimeSpanMaskProperties HideAllZeroValueOptionalSections=true />
</DxMaskedInput>
@code {
TimeSpan time { get; set; } = new TimeSpan(5, 16, 0, 15, 0);
}

Refer to the following topic for more information: Mask Settings.