Skip to main content

CalendarSettings.SelectedDate Property

Gets or sets the selected date.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v23.2.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public DateTime SelectedDate { get; set; }

Property Value

Type Description
DateTime

A DateTime object that represents the selected date.

Remarks

Use the SelectedDate property to obtain or specify the selected date in the calendar.

When an end-user selects a date in the calendar, the ASPxClientCalendar.SelectionChanged event is raised. The SelectedDate property is updated to the selected date.

@Html.DevExpress().Calendar(settings => {
    settings.Name = "calendar1";
    settings.SelectedDate = new DateTime(2010, 11, 22);
}).GetHtml()

The code result is demonstrated in the image below.

calendar-declaration.png

See Also