[Vuejs]-Vue FullCalendar: Date and Event doubleclick handler

0👍

The fullcalendar doesn’t provide this option.

But you can attach the double click handler, when the event object is contructed by using an Event Render Hooks

In the version 5 we can use the funcion eventDidMount

data() {
   return {
      calendarOptions: {
         ...
         eventDidMount: function(eventInfo){
           // Not mandatory, but you can set an id to the object
           eventInfo.el.id = eventInfo.event.id;
           // Set the dbclick event
           eventInfo.el.ondblclick = function(){
               console.log(eventInfo.event)
            };
         }
      }
   }
}

Note: This works, only because this function is called only one time, in case that you are working in other version check how many times the function is called.

0👍

Its just a work around but you could just count by clicks.

onDateSelect(payload) {
  if (this.counter === 1) {
    this.counter = 0
    return this.onDateClick(payload);
  }
  this.counter++
},

Leave a comment