Obtain information on onDblClick event

Hi!
I need information about the event when the user double-click the events on the scheduler.

scheduler.attachEvent(“onDblClick”, function (event_id, native_event_object){
//Here I need to know a property of the event for a check before make the location
window.location="<?= url_for('calendari/detall') ?>?id="+event_id;
return false;
});

How I can do? Thanks!

  • Zaida -

Hello,

scheduler.attachEvent("onDblClick", function (event_id, native_event_object){

notice event_id and native_event_object.
event_id – an id of the event on which double click was used (here i am referring to events which are displayed in the scheduler)
To get event itself use:

var ev = scheduler.getEvent(event_id);

Now you can access properties of the event, e.g. ev.text, ev.start_date, ev.your_custom_property
native_event_object – default double click event.

Best regards,
Ilya

Thank you so much Ilya!!