DayPilot Forums

DayPilot is the best open-source Outlook-like calendar control for ASP.NET.
DayPilot Pro Demo (Calendar control)
» DayPilot Pro live demo (Calendar control)
DayPilot Pro Demo (Scheduler control)
» DayPilot Pro live demo (Scheduler control)
Home » Bugs » possible bug with EventSelectJavaScript

possible bug with EventSelectJavaScript

jsinitcalendar appears as if the selected event will be passed to the eventselectjaavscript. appendProp("eventSelectHandling", calendar.EventSelectHandling, true); appendProp("eventSelectCustom", "function(e) {" + calendar.EventSelectJavaScript + "}"); However, when I use e, it has no properties. I've worked around it using the following: EventClickHandling = EventClickHandlingEnum.Select; EventSelectHandling = UserActionHandling.JavaScript; EventSelectJavaScript = string.Format("calItemClicked(c.selectedEvent())"); Am I doing something silly or is this indeed a bug?
John Murphy - 9/3/2007 4:42:43 PM
Yikes, sorry about the formatting. Your text editor doesn't work in Safari.

jsinitcalendar appears as if the selected event will be passed to the eventselectjaavscript.
appendProp("eventSelectHandling", calendar.EventSelectHandling, true);
appendProp("eventSelectCustom", "function(e) {" + calendar.EventSelectJavaScript + "}");

However, when I use e, it has no properties. I've worked around it using the following:
EventClickHandling = EventClickHandlingEnum.Select;
EventSelectHandling = UserActionHandling.JavaScript;
EventSelectJavaScript = string.Format("calItemClicked(c.selectedEvent())");

Am I doing something silly or is this indeed a bug?
John Murphy - 9/3/2007 4:45:12 PM
EventSelectJavaScript doesn't get any parameter (although it's in JsInitCalendar.cs). What you are doing with c.selectedEvent() is the right way.

I agree that it's unintuitive - I'm going to change it in the next release (e will be passed as in the other events).
Dan Letecky - 9/4/2007 1:35:15 PM
Post reply