[英]Full calendar refresh events
I used this full calendar which takes events from ajax call i want it to get new ajax values on button click event, how could this work? 我使用了这个完整的日历,它从ajax调用中获取事件,我希望它在按钮单击事件上获得新的ajax值,这怎么办?
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
defaultDate: '2014-09-12',
editable: true,
eventLimit: true, // allow "more" link when too many events
events:{
url: 'emp-attendance-ajax.php?id=' + id
},
});
如果您需要更新一个事件(更好,因为更快) .fullCalendar( 'updateEvent' , event )
否则我认为它是.fullCalendar( 'refetchEvents' )
It's resolved i used this 我用这个解决了
events: {
url: 'emp-attendance-ajax.php',
type: 'POST',
data: function() { // a function that returns an object
return {
id: id
};
}
},
instead of this one 代替这个
events:{
url: 'employees-attendance/emp-attendance-ajax.php?id=' + i++
},
and it's worked 它的工作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.