Skip to main content
All docs
V24.2

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

DateTimeOffsetEdit Class

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

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public class DateTimeOffsetEdit :
    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);

#Inheritance

See Also