0
votes

I'm using FullCalendar and have an event that spans all summer (May through August). The event is being pulled into the calendar as when I change the dates to a smaller range it works.

I was wondering if there is a way to span a single event multiple months. Basically it would show up from May 24th - August 30th across every day and week.

I only want one month showing at a time though.

1

1 Answers

1
votes

You can achieve what you would like to by supplying an end value for the event:

document.addEventListener('DOMContentLoaded', function() {
  var calendarEl = document.getElementById('calendar');
  var calendar = new FullCalendar.Calendar(calendarEl, {
    events: [{title: 'Very long event', start: '2021-05-24', end: '2021-08-31'}],
  });
  calendar.render();
});

It is important to note that for the event to display on the final day of the event you need to either add an extra day to the event value (as I have) or specify an end time e.g. 2021-08-31 18:00:00.

Here is a Pen so you can see it working.