Back to Devexpress

CalendarControlBase.SelectedRanges Property

windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-calendarcontrolbase-160c99f8.md

latest3.0 KB
Original Source

CalendarControlBase.SelectedRanges Property

Gets or sets the selected date ranges (DateRange objects). Each DateRange object identifies dates that are EQUAL OR GREATER THAN the DateRange.StartDate and LESS THAN the DateRange.EndDate. Thus the last date is excluded from the range.

Namespace : DevExpress.XtraEditors.Controls

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[Browsable(false)]
public DateRangeCollection SelectedRanges { get; }
vb
<Browsable(False)>
Public ReadOnly Property SelectedRanges As DateRangeCollection

Property Value

TypeDescription
DevExpress.XtraEditors.Controls.DateRangeCollection

A collection of selected date ranges.

|

Remarks

To check whether or not a specific date is included in selected CalendarControlBase ranges, use the IsDateSelected method, not the Contains one.

csharp
bool test = calendarControl1.SelectedRanges.IsDateSelected(DateTime.Now);
vb
Dim test As Boolean = calendarControl1.SelectedRanges.IsDateSelected(Date.Now)

See Also

AddSelection

HighlightSelection

SelectedRanges

SelectionBehavior

SelectionChanged

SelectionEnd

SelectionMode

SelectionStart

SetSelection

SyncSelectionWithEditValue

UpdateSelectionWhenNavigating

ShowClearButton

CalendarControlBase Class

CalendarControlBase Members

DevExpress.XtraEditors.Controls Namespace