A newer version of this page is available. Switch to the current version.

CalendarSettings.SelectedDate Property

Gets or sets the selected date.

Namespace: DevExpress.Web.Mvc

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

Declaration

public DateTime SelectedDate { get; set; }
Public Property SelectedDate As Date

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.

View code (Razor):

@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