Skip to main content

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

DxDateEdit<T>.MaskProperties Property

Allows you to customize mask properties for the Date Edit with custom day cells.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public RenderFragment MaskProperties { get; set; }

#Property Value

Type Description
RenderFragment

A render fragment that contains mask properties.

#Remarks

The Date Edit supports date-time and date-time offset masks. Add the DxDateTimeMaskProperties or DxDateTimeOffsetMaskProperties component to the editor’s markup to customize mask-related settings. If the markup contains any child elements, such as the DayCellTemplate, place one of these components in the MaskProperties template:

<DxDateEdit @bind-Date="@DateTimeValue" 
            Mask="@DateTimeMask.ShortDate">
    <DayCellTemplate>
        <span class="text-info">@context.Day.ToString()</span>
    </DayCellTemplate>
    <MaskProperties>
        <DxDateTimeMaskProperties CaretMode="MaskCaretMode.Advancing" />
    </MaskProperties>
</DxDateEdit>

@code{
    DateTime DateTimeValue { get; set; } = DateTime.Today;
}

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

See Also