4

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?

1

1 Answer 1

8

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);
    }
});
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.