Back to Devexpress

DxDateTimeMaskProperties Class

blazor-devexpress-dot-blazor-09475dc5.md

latest3.4 KB
Original Source

DxDateTimeMaskProperties Class

Defines date-time mask settings.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
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.

Run Demo: Date EditRun 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:

razor
@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 topics for additional information:

Implements

IComponent

IHandleEvent

IHandleAfterRender

Inheritance

Object ComponentBase DxMaskPropertiesBase DxDateTimeMaskProperties DxDateOnlyMaskProperties

DxTimeOnlyMaskProperties

See Also

DxDateTimeMaskProperties Members

DevExpress.Blazor Namespace