Gets or sets a collection of dates that are marked as not selectable.
Assembly: PresentationFramework (in PresentationFramework.dll)
Dates in this collection will appear as disabled on the drop-down calendar. If the user types a date that is not selectable, the DateValidationError event occurs.
To make all past dates not selectable, you can use the AddDatesInPast method provided by the collection returned by this property.
Legacy Code Example
The following example creates a DatePicker that displays the dates in August 2009 and specifies that each Saturday and Sunday is not selectable.Code snippet is not found. Confirm that the code snippet name 'DatePickerSnippets' is correct.
The DatePicker handles the DateValidationError event, as shown in the following code. If the user enters a date that is not selectable, the example displays a message. If the user enters text that is not a valid date, an exception is thrown.Code snippet is not found. Confirm that the code snippet name 'DatePickerSnippets' is correct.
The preceding example produces output that is similar to the following illustration.
Available since 4.0
Available since 2.0