Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
150 views
in Technique[技术] by (71.8m points)

re-draw fullCalendar on the fly

I want the fullCalendar to redraw itself (all the structure and events) without reloading the page.

Scenario: I am using a patch of fullCalendar that supports the Resource View. For a few user actions I want to change the resources. But I don't want to reload the page.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You could 'destroy' and 'render' the calendar as a whole. But that might be cumbersome - especially in older browsers.

$('#calendar').fullCalendar('destroy');
$('#calendar').fullCalendar('render');

If you don't actually need to render the table, but just rerender the events again, you could use the 'rerenderEvents' method:

$('#calendar').fullCalendar('rerenderEvents');

Hopefully this helps!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...