method Calendar.UnSelDate (d as Date)
Unselects the date.

TypeDescription
d as Date A DATE expression that is going to be unselected.

Use the UnSelDate property to unselect a date. Use the SingleSel property to specify whether the control supports single or multiple selection. Use the FocusDate property to specify the date that has the focus. Use the SelectDate property to retrieve the selected date. Use the SelCount property to retrieve the number of selected dates.

The following VB sample unselects all dates:

With Calendar1
    While .SelCount() > 0
        .UnSelDate .SelectDate(0)
    Wend
End With

The following C++ sample unselects all dates:

while ( m_calendar.GetSelCount() > 0 )
	m_calendar.UnSelDate( m_calendar.GetSelectDate( 0 ) );

The following VB.NET sample unselects all dates:

With AxCalendar1
    While .SelCount > 0
        .UnSelDate(.get_SelectDate(0))
    End While
End With

The following C# sample unselects all dates:

while (axCalendar1.SelCount > 0)
	axCalendar1.UnSelDate(axCalendar1.get_SelectDate(0));

The following VFP sample unselects all dates:

with thisform.Calendar1
	do while ( .SelCount > 0 )
		.UnSelDate( .SelectDate(0) )
	enddo
endwith