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

How to capture mousedown on events

Asked by Anonymous
7 years ago.

How can I capture the mouse down event on grid items? There is a onGridMouseDown but it's not fired for the events.

Thanks.

Answer posted by Dan Letecky [DayPilot]
7 years ago.

There is onAfterEventRender event that you can use to attach custom listeners to the event div:
https://api.daypilot.org/daypilot-scheduler-onaftereventrender/

Example
dp.onAfterEventRender = function(args) {
  args.div.addEventListener("mousedown", function(ev) { ... }, false);
};

Just note that some events are handled by DayPilot and adding a custom event handler may disrupt the built-in functionality.

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