首页 新闻 赞助 找找看

fullcalendar的events问题

0
悬赏园豆:50 [已解决问题] 解决于 2014-11-28 11:09
 1 events: function(start,end, callback) {
 2         var view = $('#calendar').fullCalendar('getView');
 3         var viewName = view.name;
 4         $.ajax({
 5           url: APP_DOMAIN+"/meetings/list_json",
 6           dataType: 'json',
 7           data: {
 8             start: start.format(),
 9             end: end.format()
10           },
11           success:function(doc) {
12             var eventServer =[];
13             $(doc).each(function() {
14               if (viewName == 'month') {
15                 eventServer.push({
16                   allDay:$(this).attr('allDay'),
17                   className:$(this).attr('className'),
18                   title:$(this).attr('title'),
19                   start:$(this).attr('start'),
20                   url:$(this).attr('url')
21                 });
22               }else{
23                 eventServer.push({
24                   allDay:$(this).attr('allDay'),
25                   className:$(this).attr('className'),
26                   title:$(this).attr('title'),
27                   start:$(this).attr('start'),
28                   end:$(this).attr('end'),
29                   url:$(this).attr('url')
30                 });
31               };
32             });
33             callback(eventServer);
34           }
35         });
36       },

为什么callback报错,我是按照官方文档来写的。

 

callback一直是false,提示boolean is not a function。

拉风的人儿的主页 拉风的人儿 | 初学一级 | 园豆:45
提问于:2014-11-28 09:41
< >
分享
最佳答案
-4

events: function(start,end,timezone, callback) {

 

少了一个timezone,官方文档害死人。。

拉风的人儿 | 初学一级 |园豆:45 | 2014-11-28 11:09
其他回答(1)
0

解决了吗?

Huan1230 | 园豆:202 (菜鸟二级) | 2021-04-21 19:43
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册