Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to put only the place holder while drag and selecting in full calendar

I just want a drag and select in full calendar to highlight a place holder to the time frame selected. But don't want the event to be rendered after releasing the click. I am using the following code which adds event after the placeholder.Can any one help?

select:function (startDate, endDate, allDay) {
  $("#eventCal").fullCalendar('addEventSource', [{
    start: startDate,
    end: endDate,
    rendering: 'background',
    block: true,
  }, ]);
}

I just dont want the event to be inserted. Is there a way? Thanks in advance.

like image 391
Saurav Dangol Avatar asked Dec 12 '25 14:12

Saurav Dangol


1 Answers

My bad.... The method of adding an event should not be implemented in the first place. All i had to do was commenting out this following code.

$("#eventCal").fullCalendar("unselect");
like image 137
Saurav Dangol Avatar answered Dec 15 '25 05:12

Saurav Dangol