AJAX Calendar/Scheduling Controls
Hello Dan,
I know that I can call the eventMenuClickCallBack from a JavaScript but what about the TimeRangeMenuClick event, can this also be called from JavaScript?
I looked through the thread you you pointed to and this doesn't answer my question (or perhaps I didn't see the answer).
I would like to fire the TimeRangeMenuClick event from JavaScript -- something like:
dpc1.eventMenuClickPostBack(e, command);
Obviously *this* code won't work because "e" is not the right "kind" of event. So perhaps the following is in order:
dpc1.eventSelectionMenuClickPostBack(e, command);
I need to fire this event (rather than the TimeRangeSelected event because I need the value of command.
Thanks!
The function you are looking for is called timeRangeMenuClickPostBack(selection, command, data).
You can acquire "selection" by calling dpc.getSelection(). "command" is just a plain string. "data" is a custom object that will be passed to the server-side handler as JSONData.
You could also use plain timeRangeSelectedPostBack(selection, data). Your custom string (command) can be passed to the server using the "data" parameter.
For more details on using "data" parameter see also http://www.daypilot.org/daypilotscheduler-sending-custom-data.html.
DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java