New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

OnDateSelected

The OnDateSelected client-side event handler of the ASP NET AJAX Calendar is called immediately after the value of the control's selection has changed.

The event handler receives two arguments:

  1. the object that fired the event.

  2. an event arguments object that exposes the following methods:OnDateSelected event arguments object for RadCalendar

NameReturn TypeArgumentsDescription
get_renderDay()RenderDay client-side objectReturns the client-side RenderDay object for the day that was just selected or unselected.
NameReturn TypeArgumentsDescription
get_oldValue()stringReturns the old value of the control, formatted as a string.
get_newValue()stringReturns the new value of the control, formatted as a string
get_oldDate()Date objectReturns the old value of the control as a Date object.
get_newDate()Date objectReturns the new value of the control as a Date object.

The following example shows the OnDateSelected event for RadCalendar:

ASPNET
<telerik:RadCalendar RenderMode="Lightweight" ID="RadCalendar1" runat="server">
    <ClientEvents OnDateSelected="dateSelected" />
</telerik:RadCalendar>			

The following example shows the OnDateSelected event for RadDatePicker. The OnDateSelected event works the same way for RadTimePicker and RadDateTimePicker.

ASPNET
<telerik:RadDatePicker RenderMode="Lightweight" ID="RadDatePicker1" runat="server">
    <ClientEvents OnDateSelected="dateSelected" />
</telerik:RadDatePicker>		

See Also

In this article
See Also
Not finding the help you need?
Contact Support