Export (0) Print
Expand All

DatePicker.SelectedDate Property

Gets or sets the currently selected date.

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

[TypeConverterAttribute(typeof(DateTimeTypeConverter))]
public Nullable<DateTime> SelectedDate { get; set; }
<sdk:DatePicker SelectedDate="dateTimeString"/>

XAML Values

dateTimeString

A date specified in the format yyyy/mm/dd. The mm and dd components must always consist of two characters, with a leading zero if necessary. For instance, the month of May should be specified as 05.

Property Value

Type: System.Nullable<DateTime>
The date currently selected. The default is null.

ExceptionCondition
ArgumentOutOfRangeException

The specified date is not in the range defined by DisplayDateStart and DisplayDateEnd, or the specified date is in the BlackoutDates collection.

Dependency property identifier field: SelectedDateProperty

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