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

DxDateOnlyMaskProperties Class

Defines DateOnly mask settings.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public class DxDateOnlyMaskProperties :
    DxDateTimeMaskProperties

#Remarks

You can apply DateOnly input masks to Date Edit and Masked Input components. This mask type allows users to enter only date values. Users can navigate between mask sections (such as months and days), 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 DxDateOnlyMaskProperties component to the editor’s markup to customize mask-related settings:

DateOnly Masks

Razor
@using System.Globalization

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

@code {
    DateOnly date { get; set; } = new DateOnly(2024, 6, 1);
    CultureInfo Culture = new CultureInfo("fr-FR");
}

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

See Also