property Calendar.SelDate as Date
Selects a date while SingleSel property is True.

TypeDescription
Date A DATE expression that indicates the selected date.

When the SingleSel property is set to True, use the SelDate property to select a date. In this mode, the focused date is also updated. You can use the FocusDate property to specify which date has the focus. When the SingleSel property is False, use the SelectDate and SelCount properties to enumerate the selected dates. The control raises the SelectionChanged event whenever the user selects a new date. To work with the visible range, use the FirstVisibleDate property to get the first visible date, and the LastVisibleDate property to get the last visible date.

The following VB sample prints the selected date(s):

With Calendar1
    Dim i As Long
    For i = 0 To .SelCount - 1
        Debug.Print FormatDateTime(.SelectDate(i), vbLongDate)
    Next
End With

The following C++ sample prints the selected date(s):

for ( long i = 0 ; i < m_calendar.GetSelCount() ; i++ )
{
	COleDateTime date = m_calendar.GetSelDate();
	OutputDebugString( date.Format() );
}

The following VB.NET sample prints the selected date(s):

With AxCalendar1
    Dim i As Integer
    For i = 0 To .SelCount - 1
        System.Diagnostics.Debug.WriteLine(.get_SelectDate(i).ToString())
    Next
End With

The following C# sample prints the selected date(s):

for (int i = 0; i < axCalendar1.SelCount; i++)
	System.Diagnostics.Debug.WriteLine(axCalendar1.get_SelectDate(0).ToString());

The following VFP sample prints the selected date(s):

with thisform.Calendar1
	local i, d
	for i = 0 to .SelCount -1
		d = .SelectDate(i)
	next
endwith