All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

DateTimeOffsetEdit Class

The editor that manages values of the System.DateTimeOffset type.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v20.2.dll

Declaration

public class DateTimeOffsetEdit :
    BaseSpinEdit
Public Class DateTimeOffsetEdit
    Inherits BaseSpinEdit

Remarks

The DateTimeOffsetEdit editor has the DateTimeOffset mask that allows users to enter values in the "MM/DD/YYYY HH:MM:SS AM(PM) +(-)HH:MM" format. You can modify this mask via the Properties.MaskSettings property.

dateTimeOffsetEdit1.Properties.MaskSettings.MaskManagerType = typeof(DateTimeOffsetMaskManager);
dateTimeOffsetEdit1.Properties.MaskSettings.MaskExpression = "hh:mm (zzz)";
//or
dateTimeOffsetEdit1.Properties.MaskSettings.Configure<MaskSettings.DateTimeOffset>(settings => {
    settings.MaskExpression = "hh:mm (zzz)";
});
//or
var dtSettings = dateTimeOffsetEdit1.Properties.MaskSettings.Configure<MaskSettings.DateTimeOffset>();
dtSettings.MaskExpression = "hh:mm (zzz)";

The editor drop-down panel changes its layout according to the active mask.

different drop-down layouts

To assign a DateTimeOffset value to this editor or read the current editor value, use the DateTimeOffset property.

dateTimeOffsetEdit1.DateTimeOffset = DateTimeOffset.Now.AddDays(5);
See Also