0
我在这里与FullCalendar有一个愚蠢的问题,一旦我运行我的回调函数事件消失的页面。FullCalendar jQuery插件,事件消失拖动
这是我的日历
var calendarSettings = {
selectable: true,
selectHelper: true,
editable: true,
events: '/ajaxCalenderEvents',
timeFormat: 'yyyy-MM-dd',
eventDrop: function(object){
calendar.drop(object);
//console.log(object);
}
}
这是函数的eventDrop事件调用设置,
calendar = {
drop: function(o){
o.start = $.fullCalendar.formatDate(o.start, 'yyyy-MM-dd');
o.end = $.fullCalendar.formatDate(o.end, 'yyyy-MM-dd');
$.post('/ajaxMoveDateRange', {data: o}, function(data){
}, "json");
}
}
然而,当我拖动事件,并把它,它完美地触发Ajax请求然而事件消失。
但是。
如果我这样做:
var calendarSettings = {
selectable: true,
selectHelper: true,
editable: true,
events: '/ajaxCalenderEvents',
timeFormat: 'yyyy-MM-dd',
eventDrop: function(o){
o.start = $.fullCalendar.formatDate(o.start, 'yyyy-MM-dd');
o.end = $.fullCalendar.formatDate(o.end, 'yyyy-MM-dd');
$.post('/ajaxMoveDateRange', {data: o}, function(data){
}, "json");
}
}
,并有函数内联,它工作正常。
但是,我们使用的文件结构/模型意味着我们需要按照以前的格式对其进行格式化,调用外部函数。
有没有人知道这可能发生的任何原因?我试过返回true和东西,并围绕文档引出,但找不到任何东西,所以任何帮助,将不胜感激。
谢谢
好吧,我已经收窄至$ .fullCalendar.formatDate(启动, 'YYYY-MM-DD');线。当我运行这个功能它清除日历... – Owen 2013-05-01 10:57:54