jquery fullcalendar - viewDisplay to pass selected month to events (reload events per month)
Posted
by newbieToFullCalendar
on Stack Overflow
See other posts from Stack Overflow
or by newbieToFullCalendar
Published on 2010-04-11T22:23:55Z
Indexed on
2010/04/12
9:43 UTC
Read the original article
Hit count: 1333
Hi,
How can I pass the selected month from viewDisplay
to the events function (which is a php call to the DB to load the events)? Only events for one month should get loaded at a time, but I'm afraid of what might happen if the user decides to click 'next' multiple times really quickly... My other option is to load 6 months forward and 6 months backwards of events so when the user moves between months, it would be seamless, but there are at least three events per day everyday so I'm guessing that would take some time to load.
$('#calendar').fullCalendar({
theme: true,
slotMinutes: 60,
defaultView: 'month',
lazyFetching: false,
viewDisplay: function(view) {
document.forms[0].elements['currentMonth'].value = view.title;
alert('The new title of the view is ' + document.forms[0].elements['currentMonth'].value);
},
events: <?php include('load_json_events.php'); ?>
});
© Stack Overflow or respective owner