Search code examples
javascriptjqueryfullcalendarfullcalendar-2

Disable highlight of an external event in fullcalendar


I am using the fullcalendar jquery plugin v2.6.1. Actually, I want to prevent the highlighted option of an external events while dragging to the calendar.

Is there any possible way to disable the fc-highlight from the event or any option to show the highlight on the basis of event size. I mean to say that I have an external event with start and end time e.g the event starts from 10:00 and ends at 11:00 but when I'm dragging that event to the calendar, the fc-highlight always covered the two hours slot.

Picture attached below

enter image description here

So in the picture, the grayish highlighted box in red stroke Event 2 which is only available for one hour slot but the highlighted background covers two hours which I want to disable it or just make it one hour. Please help.

Thanks in advance!


Solution

  • You can achieve the solution by adding defaultTimedEventDuration: 01:00:00 in FullCalendar options or adding duration in an external events, something like this:

    <div class="external fc-event" duration="04:00">Event</div>