FullCalendar lazyFetching
Posted
by RamaKrishna
on Stack Overflow
See other posts from Stack Overflow
or by RamaKrishna
Published on 2010-04-28T12:05:16Z
Indexed on
2010/04/28
12:13 UTC
Read the original article
Hit count: 484
fullcalendar
|jQuery
I had enabled lazyFetching option with true/false. and click on any button of calendar then calendar sending multiple ajax calls to get data.
Here is my configuration
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
editable: false,
disableDragging:true,
contentHeight: 500,
width: 800,
minTime:9,
maxTime:21,
lazyFetching:true,
defaultView:'agendaWeek',
loading: function(isLoading, view){
if(isLoading){
$('.fc-button-prev, .fc-button-next , .fc-button-month ,.fc-button-agendaWeek , .fc-button-agendaDay').hide();
$('.products').attr("disabled","disabled");
}else{
$('.fc-button-prev, .fc-button-next , .fc-button-month ,.fc-button-agendaWeek , .fc-button-agendaDay').show();
$('.products').removeAttr("disabled");
}
}
});
function loadCal(storeId,contactId){
$('#calendar').fullCalendar( 'removeEvents');
$('#calendar').fullCalendar( 'addEventSource','getApptsByStore.action?storeId='+storeId+'&contactId='+contactId);
}
© Stack Overflow or respective owner