blazor-devexpress-dot-blazor-dot-dxtimespanmaskproperties-a1d7d507.md
Specifies whether the editor’s value can be negative.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue(true)]
[Parameter]
public bool AllowNegativeValue { get; set; }
| Type | Default | Description |
|---|---|---|
| Boolean | true |
true if the editor’s value can be negative; otherwise, false.
|
Time span masks allow users to enter a negative time interval. Set this property to false to prevent users from entering a negative value:
<DxMaskedInput @bind-Value="@time"
Mask="@TimeSpanMask.GeneralShortFormat">
<DxTimeSpanMaskProperties AllowNegativeValue="false" />
</DxMaskedInput>
@code {
TimeSpan time { get; set; } = new TimeSpan(5, 16, 30, 15, 7);
}
Note
You can assign a negative value to the editor even if this property is set to false. In this case, the editor converts this value to a positive value only after a user modifies it. Until that time, the editor value remains negative.
Refer to the following topic for additional information: Mask Settings.
See Also
DxTimeSpanMaskProperties Class