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

DxDateTimeOffsetMaskProperties Class

Defines date-time offset mask settings.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public class DxDateTimeOffsetMaskProperties :
    DxMaskPropertiesBase

#Remarks

You can apply date-time offset input masks to the Date Edit and Masked Input components. Date-time offset masks allow users to enter only date and/or time values, including the time’s offset from Coordinated Universal Time (UTC). 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 Offset Masks

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

Razor
@using System.Globalization

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

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

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

#Inheritance

Object
ComponentBase
DxMaskPropertiesBase
DxDateTimeOffsetMaskProperties
See Also