fullCalendarを使用しているページに次のコードがあります。ページにイベントを追加できますが、カレンダーにこれが動的に表示されません。追加した日付が表示される前に、別の月に移動する必要があります(その後、現在の月に戻る必要があります)。
プログラムで日付が追加されたときにカレンダーを動的に更新/レンダリングする方法はありますか?
これまでの私のコードの抜粋は次のとおりです。
## the code for generating the calendar
<script>
$(document).ready(function() {
$('#calendar').fullCalendar({
editable: false,
events: 'http://example.com/getevents.php',
});
});
</script>
<h1>Calendar Test</h1>
<div id='calendar'></div>
## the code for updating it
$('#calendar').fullCalendar( 'refetchEvents' );