Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TimeSpanSection Enum

Lists sections for time span masks.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public enum TimeSpanSection

#Members

Name Description
Days

A section that displays days.

Hours

A section that displays hours.

Minutes

A section that displays minutes.

Seconds

A section that displays seconds.

Milliseconds

A section that displays milliseconds.

FractionalSeconds

A section that displays fractions of a second.

#Related API Members

The following properties accept/return TimeSpanSection values:

#Remarks

A time span mask can include multiple sections (for instance, hours and minutes). The DefaultFocusSection property allows you to define which section receives focus after you call the FocusAsync() method. If a user selects all content and starts to enter digits, the editor directs user input into the default focus section.

The following code snippet sets the Minutes section as the default focus section:

Razor
<DxMaskedInput @bind-Value="@time" 
               Mask="@TimeSpanMask.GeneralShortFormat">
    <DxTimeSpanMaskProperties DefaultFocusSection="@TimeSpanSection.Minutes" />
</DxMaskedInput>

@code {
    TimeSpan time { get; set; } = new TimeSpan(5, 16, 30, 15, 7);
}

Refer to the following topic for more information: Time Span Masks.

See Also