search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

When someone clicks on active area, how do I stop the default event from firing?

Asked by Doug
1 year ago.

Question: in scheduler, for onBeforeEventRender, I add an active area with an onClick. How do I stop the onEventClick from the event from firing? If they click on the event area, there's no need to execute the event's onEventClick handler.


// Some of the code  (I can't figure out how to post code on here)

dp.onEventClick = function(args) {
  editBlock(, false);

dp.onBeforeEventRender = function(args) { = [
      top: 7,
      right: 0,
      bottom: 9,
      width: 17,
      height: 17,
      onClick: function(args) {
        var areaObj;
        jQuery("#delete_block_dialog" ).dialog({
          // some dialog code here
        return false;
      visibility: "Visible",
      css: "fa fa-times delete_calendar_event"
// etc.
Comment posted by Dan Letecky [DayPilot]
1 year ago.

You can prevent the click event to bubble to the event by specifying:

action: "None"

in the active area properties.

Please see also:

PS: You can highlight code snippets by wrapping it in < pre > code < /pre > (without spaces)

Answer posted by Doug
1 year ago.

That did not do what I was looking for, however, I looked at the docs at the link you sent and adding the following code to the area onClick works:


I'm not sure if my terminology was correct in the question.

Comment posted by Dan Letecky [DayPilot]
1 year ago.

Great, thanks for posting the solution!

Comment posted by Dan Letecky [DayPilot]
1 year ago.

There was a bug in the action: "None" handling and it didn't work as expected. It's fixed now in the latest sandbox build (2019.4.4162).

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.