Skip to main content
All docs
V24.2

CompatibilitySettings.IgnoreClientDateTimeOffsetInDateEdit Property

Specifies whether the Date Edit displays DateTimeOffset values without conversion to the client’s time zone.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

public static bool IgnoreClientDateTimeOffsetInDateEdit { get; set; }

Property Value

Type Description
Boolean

true to display values without conversion to the client’s time zone; false to convert values based on the client’s time zone offset.

Remarks

In v23.1, the Date Edit component checks the Offset part of DateTimeOffset values and converts such values to the client’s time zone. This allows the component to correctly display date and time values in Web applications with different client and server time zones.

<DxDateEdit @bind-Date="@DateOffset" TimeSectionVisible="true"/>

@code {
    DateTimeOffset DateOffset { get; set; } = DateTimeOffset.Now;
}

Run Demo

This functionality affects your application in the following cases:

  1. Your component’s Date property is bound to a DateTimeOffset or nullable < DateTimeOffset> object.

  2. You do not allow a user to edit the Offset part of DateTimeOffset values. Note that the Offset part is editable when the component’s Mask or Format property value is O or o, R or r, or contains z.

Note

When the Date Edit component converts DateTimeOffset values to the client’s time zone, the DateChanged event does not fire.

In previous versions, the component displayed DateTimeOffset values without conversion to the client’s time zone.
Use the IgnoreClientDateTimeOffsetInDateEdit property to restore this behavior. Specify this property in the Program.cs file before you register DevExpress resources:

// ...
DevExpress.Blazor.CompatibilitySettings.IgnoreClientDateTimeOffsetInDateEdit = true;
builder.Services.AddDevExpressBlazor();
// ...
app.Run();
See Also