RadCalendar for ASP.NET

OnDateClick Send comments on this topic.
Telerik RadCalendar Client-Side > Client-Side Events > OnDateClick

Glossary Item Box

 

Fired

When a calendar cell is clicked. That event occurs even if the cell is disabled, or generally does not allow date selection.

Arguments

calendarInstance - the Telerik RadCalendar instance that raised the event.

args (composite argument)

  • args.RenderDay - a RenderDay object corresponding to the server-side RadCalendarDay.
  • args.DomEvent - event object corresponding to the click event (you can use this object to get the x, y coordinates of the mouse click).

Can be cancelled

Yes, return false to cancel.

Example

ascx/aspx

<_asp3a_checkbox id="BeforeExpand" runat="server" text="BeforeClientPanelItemExpanded">
Copy Code
<radc:radcalendar id="Ca1endar1" runat="server">
    <ClientEvents
      OnDateClick="Calendar_OnDateClick">
   </ClientEvents>
</radc:radcalendar>

JavaScript

The javascript function for implementing the OnDateClick event looks like this:
 
Copy Code
function Calendar_OnDateClick(calendarInstance, args)
{
    ....
    return confirm("OnDateClick: " + args.RenderDay.Date, "Postback?");
}