Skip to main content

DateNavigator.DateTime Property

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

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v24.1.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.Multiselect property to false.

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