Export (0) Print
Expand All

DatePicker.BlackoutDates Property

Gets or sets a collection of dates that are marked as not selectable.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls (in System.Windows.Controls.dll)

public CalendarBlackoutDatesCollection BlackoutDates { get; private set; }

Property Value

Type: System.Windows.Controls.CalendarBlackoutDatesCollection
A collection of dates that cannot be selected. The default value is an empty collection.

Dates in this collection will appear as disabled on the drop-down calendar.

To make all past dates not selectable, you can use the AddDatesInPast method provided by the collection returned by this property.

Adding a date to this collection when it is already selected or adding a date outside the range specified by DisplayDateStart and DisplayDateEnd will cause an ArgumentOutOfRangeException.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft