我如何使用Ajax加载日历上的所有事件? [英] How can I load all events on calendar using Ajax?

查看:84
本文介绍了我如何使用Ajax加载日历上的所有事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在点击<议程视图>中的下一个上一个按钮时,使用 Ajax 加载全日历上的所有活动。



我想,当点击next-previous-button时,我会发送当前日期('ym-d')到url:'fetch-events.php'然后它会返回事件
$ b $

  $('#:$ title):{id:,title:,start:,end:,allDay:}格式数据日历')。fullCalendar({

header:{
left:'prev,next today',
center:'title',
right:'month, agendaweek,agendaDay'
},
selectable:false,
selectHelper:false,
editable:false,

events:// on-click next使用Ajax
//使用Ajax发布日期,然后查询获取所有事件并返回数据

});

json 不适用于我的情况


解决方案

Frank在FullCalendar在线文档中有答案: http://arshaw.com/fullcalendar/docs/event_data/events_function/


I want to load all events on full-calendar using Ajax when I clicked next-previous-button in 'agenda-views'.

I guess, when will click on next-previous-button then i'll send current date('y-m-d') to url: 'fetch-events.php' then it will return event{ id: ,title: , start: , end: , allDay: } format data for rendering on calendar

$('#calendar').fullCalendar({

   header: {
             left: 'prev,next today',
             center: 'title',
             right: 'month,agendaWeek,agendaDay'
   },
   selectable: false,
   selectHelper: false,
   editable: false,

  events: // on-click next-previous button load events using Ajax
          // post date using Ajax, then query to fetch all events and return data

 });

json not working in my case

解决方案

Frank you have the answer at the FullCalendar online doc: http://arshaw.com/fullcalendar/docs/event_data/events_function/

这篇关于我如何使用Ajax加载日历上的所有事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆