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 |
|
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;
}
This functionality affects your application in the following cases:
Your component’s Date property is bound to a DateTimeOffset or nullable < DateTimeOffset> object.
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
oro
,R
orr
, or containsz
.
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();