Skip to main content

DxDateTimeMaskProperties Class

Defines date-time mask settings.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

public class DxDateTimeMaskProperties :
    DxMaskPropertiesBase

Remarks

You can apply date-time input masks to the Date Edit, Time Edit, and Masked Input components. Date-time masks allow users to enter only date and/or time values. Users can navigate between mask sections (such as months, days, and hours) and increase or decrease section values with the Up and Down arrow keys, and the mouse wheel.

Date-Time Masks

Run Demo: Date Edit Run Demo: Time Edit Run Demo: Masked Input

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 DxDateTimeMaskProperties component to the editor’s markup to customize mask-related settings:

@using System.Globalization

<DxDateEdit @bind-Date="@date" 
            Mask="@DateTimeMask.ShortDate">
    <DxDateTimeMaskProperties CaretMode="@MaskCaretMode.Advancing"
                              Culture="Culture"
                              InvalidInputNotificationText="The date is invalid."
                              UpdateNextSectionOnCycleChange="true" />
</DxDateEdit>

@code {
    DateTime date { get; set; } = DateTime.Now;
    CultureInfo Culture = new CultureInfo("fr-FR");
}

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

Inheritance

See Also