Skip to main content

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

DurationEdit Class

The combo box control used to specify time intervals (durations).

Namespace: DevExpress.XtraScheduler.UI

Assembly: DevExpress.XtraScheduler.v24.2.dll

NuGet Package: DevExpress.Win.Scheduler

#Declaration

[ComVisible(false)]
public class DurationEdit :
    ComboBoxEdit

#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.

DurationEdit

See Also