DurationEdit Class
The combo box control used to specify time intervals (durations).
Namespace: DevExpress.XtraScheduler.UI
Assembly: DevExpress.XtraScheduler.v24.1.dll
NuGet Package: DevExpress.Win.Scheduler
Declaration
Remarks
The DurationEdit control provides the capability to choose a duration from a list of predefined intervals from 5 minutes to 2 days, or enter a custom interval. The control parses the entered string using HumanReadableTimeSpanHelper.ParseString method. You can enter a string composed of figures and predefined words, and it will be properly interpreted and converted to the TimeSpan value.
The following words are recognized by default:
- Minutes: “m”, “min”, “minute” “minutes”
- Hours: “h”, “hour”, “hours”
- Days: “d”, “day”, “days”
- Weeks: “w”, “week”, “weeks”
- Month: “month”, “months”
- Year: “year”, “years”
A list of accepted words signifying names of time intervals and their abbreviations is contained within localized resources. It is represented by the SchedulerStringId enumeration values - those starting with “Abbr..”, e.g. SchedulerStringId.Abbr_Minute, SchedulerStringId.Abbr_Minutes, SchedulerStringId.Abbr_HoursShort, SchedulerStringId.Abbr_Hour and so on.
Use the DurationEdit.LoadDefaults method to set the upper limit on editor values loaded by default.
The DurationEdit.Duration property reflects the time interval selected by the user.
The common appearance of the control is shown below.