Adil Malik
Adil Malik

Reputation: 6357

Show in AllDay slot even if event.allDay = false;

If an event start on a date and ends on some other date (say, next date). I want to show such events in allDay slot but don't want to mark event.allDay = true; Any idea how can I do this ?

Upvotes: 0

Views: 1416

Answers (1)

Adil Malik
Adil Malik

Reputation: 6357

I modified the calendar code like this:

Find this method (for me it's on line#4467)

function renderEvents(events, modifiedEventId)

In this method find the following check:

if (events[i].allDay) { ... }

Replace it with this:

if (events[i].allDay || (events[i].end - events[i].start > 3600000) ) {
    // if event spans more than a day show it in allDay area
...
}

Now any events that span more than a day will be shown in allDay area even if they are not marked 'allDay' This was my requirement I had to do it like this. I mentioned it here in case anyone else come here searching a similar solution.

Upvotes: 2

Related Questions