Skip to main content
A newer version of this page is available. .

DxTimeSpanMaskProperties.DefaultFocusSection Property

Specifies which section receives focus after you call the FocusAsync() method.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public TimeSpanSection? DefaultFocusSection { get; set; }

Property Value

Type Description
Nullable<TimeSpanSection>

A mask section.

Available values:

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.

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 to the default focus section.

The example below sets the Minutes section as the default focus section:

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

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

Default Focus Section

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

See Also