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

OnDateClick

The OnDateClick client-side event handler of the ASP NET AJAX Calendar is called when the user clicks on a date in the day matrix or presses the ENTER key while a date has focus. If the day is selectable, this event occurs before the OnDateSelecting event. If the day is not selectable (but in the valid range), this event occurs, but not the OnDateSelecting event.

The event handler receives two arguments:

  1. the RadCalendar object that fired the event.

  2. an event arguments object that exposes the following methods:OnDateClick event arguments object

NameReturn TypeArgumentsDescription
get_renderDay()RenderDay client-side objectReturns the client-side RenderDay object that represents the day that was just clicked.
get_domEvent()DOM event objectReturns the DOM event object for the mouse click event.
set_cancel(value)boolLets you prevent the click from selecting the date that is clicked. However, even after calling set_cancel(true) , focus still moves to the clicked date.

The following example uses the OnDateClick event to confirm the selection of a date:

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

See Also

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