property Calendar.SelCount as Long
Indicates the number of dates being selected in the calendar panel.

TypeDescription
Long A long expression that specifies the number of selected dates in the calendar panel.
The SelCount property counts the dates being selected in the calendar panel. The SingleSel property indicates whether the user can select one or multiple dates. If the SingleSel property is True, the SelCount property always returns 1. The SelDate property can be used to get the selected date giving its index in the selection dates collection. The AllowSelectDate property indicates the keys combination so the user can select new dates in the calendar panel, and so, new dates to be shown in the schedule view. Once the user starts selecting a new date in the calendar panel, the control fires the LayoutStartChanging(exCalendarSelectionChange). Once a new date is selected, the LayoutEndChanging(exCalendarSelectionChange) event occurs.

You can use the SelCount/SelDate or Selection to enumerate the selected dates. Use the Selection/SelectDate property to change programmatically the dates being selected in the calendar, including the dates to be shown in the schedule view.

The following VB sample shows how you can enumerate the selected dates using the SelCount and SelDate properties  once the selection is changed:

Private Sub Schedule1_LayoutEndChanging(ByVal Operation As EXSCHEDULELibCtl.LayoutChangingEnum)
    If Operation = exCalendarSelectionChange Then
        Dim i As Long
        With Schedule1.Calendar
            For i = 0 To .SelCount() - 1
                Debug.Print "Select: " & .SelDate(i)
            Next
        End With
    End If
End Sub

The following VB/NET sample shows how you can enumerate the selected dates using the SelCount and SelDate properties  once the selection is changed:

Private Sub Exschedule1_LayoutEndChanging(ByVal sender As System.Object, ByVal Operation As exontrol.EXSCHEDULELib.LayoutChangingEnum) Handles Exschedule1.LayoutEndChanging
    If Operation = exontrol.EXSCHEDULELib.LayoutChangingEnum.exCalendarSelectionChange Then
        Dim i As Long = 0
        With Exschedule1.Calendar
            For i = 0 To .SelCount - 1
                Debug.Print("Select: " & .get_SelDate(i))
            Next
        End With
    End If
End Sub

The following C# sample shows how you can enumerate the selected dates using the SelCount and SelDate properties  once the selection is changed:

private void exschedule1_LayoutEndChanging(object sender, exontrol.EXSCHEDULELib.LayoutChangingEnum Operation)
{
    if ( Operation == exontrol.EXSCHEDULELib.LayoutChangingEnum.exCalendarSelectionChange  )
    {
        for (int i = 0; i < exschedule1.Calendar.SelCount; i++)
            System.Diagnostics.Debug.Print("Select: " + exschedule1.Calendar.get_SelDate(i).ToString());
    }
}

The following VFP sample shows how you can enumerate the selected dates using the SelCount and SelDate properties  once the selection is changed:

*** ActiveX Control Event ***
LPARAMETERS operation
*	1 ' exCalendarSelectionChange
    If Operation = 1 Then
    	for i = 0 to thisform.Schedule1.Calendar.SelCount() - 1
    		wait window TToC(thisform.Schedule1.Calendar.SelDate(i))
    	next
    EndIf

The following C++ sample shows how you can enumerate the selected dates using the SelCount and SelDate properties  once the selection is changed:

void LayoutEndChangingSchedule1(long Operation)
{
	if ( Operation == EXSCHEDULELib::exCalendarSelectionChange )
	{
		for ( int i = 0; i < m_spSchedule->Calendar->SelCount; i++ )
		{
			CString sMessage;
			sMessage.Format(_T("Select: %f\r\n"), m_spSchedule->Calendar->SelDate[i] );
			OutputDebugString( sMessage );
		}
	}
}

where m_spSchedule is of EXSCHEDULELib::ISchedulePtr type.