Version

SelectedDate Property

Returns or sets the date of the CalendarItem that should be selected or null if no item is selected.
Syntax
'Declaration
 
Public Property SelectedDate As Nullable(Of Date)
public Nullable<DateTime> SelectedDate {get; set;}
Remarks

The SelectedDate returns the first date that is selected within the control and is primarily used when using a SelectionType of Single. If you are using a SelectionType that allows multiple dates to be selected, then you can use the SelectedDates to get a complete list of the dates that are selected. The SelectedDates will include the SelectedDate.

Note: When the MinCalendarMode is set to a value other than days, selecting a CalendarItem will only add 1 entry for each selected item. It will not add each date in the item's range into the SelectedDates.

Note: When in navigation mode (i.e. the CurrentCalendarMode is not equal to the MinCalendarMode), the selection cannot be changed via the ui. Instead using the mouse will change the active item and the IsSelected state will be based on which item is active (IsActive).

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also