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

DateNavigator.DateTime Property

Gets or sets a single date selected in the DateNavigator control.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v24.2.dll

NuGet Package: DevExpress.Win.Scheduler

#Declaration

[DXCategory("Appearance")]
public override DateTime DateTime { get; set; }

#Property Value

Type Description
DateTime

A DateTime object that is the selected date.

#Remarks

Use the DateTime property to select a single date in the DateNavigator in code.

To prevent end-users from selecting multiple dates in the DateNavigator, set the CalendarControlBase.SelectionMode property to Single.

If multiple dates are selected, the DateTime returns the date on which the mouse had focus most recently. To obtain selected dates, use the CalendarControlBase.SelectedRanges property, CalendarControlBase.SelectionStart and CalendarControlBase.SelectionEnd properties.

To select multiple dates programmatically, use the SchedulerViewBase.SetVisibleIntervals method of the SchedulerControl bound to the DateNavigator control via its DateNavigator.SchedulerControl property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DateTime property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also