This JavaScript error can appear when you upgrade DayPilot Pro 3.5 to DayPilot Pro 3.6. It is caused by a changed JavaScript API for calling server-side EventMenuClick event from JavaScript (using AJAX callback or PostBack).
This example asks the user for confirmation before the menu action is executed.
Old syntax:
<DayPilot:MenuItem Action="JavaScript" Command='Delete' 
JavaScript="if (confirm('Do you really want to delete this event?')) 
ctl00_ContentPlaceHolder1_DayPilotCalendar1.CommandHandler('Delete', '{0}', '{1}');" 
Text="Delete" /> 
New syntax:
<DayPilot:MenuItem Action="JavaScript" Command='Delete' 
JavaScript="if (confirm('Do you really want to delete this event?')) 
ctl00_ContentPlaceHolder1_DayPilotCalendar1.eventMenuClickCallBack(e, command);" 
Text="Delete" />
See also the documentation for 
context menu.