Home Unanswered Active Tags New Question

eventMenuClickCallBack

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?

Asked by Joacim 4 years ago.
Replies
Hi Joacim,

Yes, it's possible. Please check this thread: http://forums.daypilot.org/Topic.aspx/158/how_do_i_show_context_menu_on_highlight_event

Let me know if you have any troubles with that.
Comment posted by Dan Letecky 4 years ago.

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!

Comment posted by Anonymous 2 years ago.

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.

Comment posted by Dan Letecky 2 years ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java