DateEdit.SelectionChanged Event
Fires when the selected date range changes.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v25.2.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Event Data
The SelectionChanged event's data class is EventArgs.
Remarks
The SelectionChanged event fires when the user changes the selected date range in the drop-down calendar. Use the SelectedRanges property to obtain the updated selection.
The SelectionChanged event is active when the DateEdit.Properties.SelectionMode property is set to CalendarSelectionMode.Multiple.
The following code snippet handles the SelectionChanged event to display the number of selected date ranges:
using DevExpress.XtraEditors;
dateEdit.SelectionChanged += (sender, e) => {
DateEdit editor = (DateEdit)sender;
labelControl1.Text = $"Selected ranges: {editor.SelectedRanges.Count}";
};
See Also