Skip to main content
All docs
V24.2

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

DxTimeOnlyMaskProperties Class

Defines TimeOnly mask settings.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public class DxTimeOnlyMaskProperties :
    DxDateTimeMaskProperties

#Remarks

You can apply DateOnly input masks to Time Edit and Masked Input components. This mask type allows users to enter only date values. Users can navigate between mask sections (such as hours and minutes) and increase or decrease section values with the Up and Down arrow keys and mouse wheel.

Choose a mask from a number of predefined patterns or use a standard or custom format string. Assign a mask pattern to an editor’s Mask property to apply the mask to the editor. Add the DxTimeOnlyMaskProperties component to the editor’s markup to customize mask-related settings:

TimeOnly Masks

Razor
@using System.Globalization

<DxTimeEdit @bind-Time="@time"
            Mask="t">
    <DxTimeOnlyMaskProperties CaretMode="@MaskCaretMode.Advancing"
                              Culture="Culture"
                              InvalidInputNotificationText="The date is invalid."
                              UpdateNextSectionOnCycleChange="true" />
</DxTimeEdit>

@code {
    TimeOnly time { get; set; } = new TimeOnly(15, 10, 15);
    CultureInfo Culture = new CultureInfo("fr-FR");
}

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

See Also