I have an event with a color bar extending over 3 days. I would like a number to show how many days that color bar extends across. So, if I have a color bar thru jan 1, 2 & 3... I want a number show that says "3". representing "3 days". I assume it IS event durations?
You can modify the event in 'eventRender' callback. untested but i think this would work:
$('#calendar').fullCalendar({
// some other options,
eventRender: function(event, element, view) {
var duration = moment.duration(event.end - event.start).days();
element.find('.fc-title').append(duration);
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With