CalendarSelectedDate Property

Gets or sets the currently selected date.

Definition

Namespace: Avalonia.Controls
Assembly: Avalonia.Controls (in Avalonia.Controls.dll) Version: 11.3.999
public DateTime? SelectedDate { get; set; }

Property Value

NullableDateTime
The date currently selected. The default is null.

Remarks

Use this property when SelectionMode is set to SingleDate. In other modes, this property will always be the first date in SelectedDates.

Exceptions

ArgumentOutOfRangeException The given date is outside the range specified by DisplayDateStart and DisplayDateEnd -or- The given date is in the BlackoutDates collection.
InvalidOperationException If set to anything other than null when SelectionMode is set to None.

See Also