Skip to main content

ASPxCalendar.SelectedDate Property

Gets or sets the selected date.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.1.dll

NuGet Package: DevExpress.Web


[DefaultValue(typeof(DateTime), "")]
public DateTime SelectedDate { get; set; }

Property Value

Type Default Description
DateTime String.Empty

A DateTime object that represents the selected date.


Use the SelectedDate property to obtain or specify the selected date in the calendar. Changing this property affects the editor’s ASPxEditBase.Value property.

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


This example demonstrates how end-user input can be limited by defining a specific date range within the ASPxCalendar control.

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register assembly="DevExpress.Web.v8.3, Version=, Culture=neutral, 
PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dxe" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 

<script runat="server">

 <html xmlns="" >
 <head id="Head1" runat="server">
     <title>Max and Min Dates of ASPxCalendar</title>
     <form id="form1" runat="server">
         <dxe:ASPxCalendar ID="ASPxCalendar1" runat="server" MaxDate="2007-08-24" 
         MinDate="2007-08-08" SelectedDate="2007-08-16">
See Also