Back to Devexpress

MaskCaretMode Enum

blazor-devexpress-dot-blazor-7b407871.md

latest3.0 KB
Original Source

MaskCaretMode Enum

Lists caret navigation modes for date-time, date-time offset, and time span masks.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public enum MaskCaretMode

Members

NameDescription
Regular

Input focus remains within one section until a user moves focus to another section.

| | Advancing |

After a user completes input into a mask section, the caret moves to the next editable section.

|

The following properties accept/return MaskCaretMode values:

Remarks

Date-time, date-time offset, and time span masks can include multiple sections (for instance, the days and hours sections). These masks allow users to modify only one section at a time. Input focus remains within one section until a user moves focus to another section.

Set the CaretMode property to Advancing to move the caret to the next editable section after a user completes input into a mask section:

razor
<DxDateEdit @bind-Date="@date" 
            Mask="@DateTimeMask.ShortDate">
    <DxDateTimeMaskProperties CaretMode="@MaskCaretMode.Advancing" />
</DxDateEdit>

@code {
    DateTime date { get; set; } = DateTime.Now;
}
razor
<DxDateEdit @bind-Date="@date" 
            Mask="@DateTimeMask.ShortDate">
    <DxDateTimeOffsetMaskProperties CaretMode="@MaskCaretMode.Advancing" />
</DxDateEdit>

@code {
    DateTimeOffset date { get; set; } = DateTimeOffset.Now;
}
razor
<DxMaskedInput @bind-Value="@time" 
               Mask="@TimeSpanMask.GeneralShortFormat">
    <DxTimeSpanMaskProperties CaretMode="@MaskCaretMode.Advancing" />
</DxMaskedInput>

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

See Also

DevExpress.Blazor Namespace