Latest web development tutorials

ASP.NET Calendar SelectedDate property

Calendar Control Calendar Control

Definition and Usage

SelectedDate property sets or returns the selected date in the calendar.


Examples

The following example output is selected this date is selected at a certain date:

<script language="VB" runat="server">
Sub Change(obj As Object, e As EventArgs)
Response.Write("Date: ")
Response.Write(cal1.SelectedDate.ToShortDateString())
End Sub
</script>

<form runat="server">
<asp:Calendar id="cal1" runat="server"
OnSelectionChanged="Change" />
</form>

The demonstration >>

Calendar Control Calendar Control