我正在使用Fullcalendar进行Backbone项目。我使用了FC v.1但是当我改为FC v2时,select方法在点击一天td时会返回两天的时间。
$("#calendar").fullCalendar({
header: {
left: 'prev,next, today',
center: 'title',
right: 'month,agendaWeek,agendaDay',
ignoreTimezone: false
},
select: this.select,// this launch the click select
selectable: true,
selectHelper: true,
editable: true,
aspectRatio: 2.5,
height: 600,
weekNumbers: true
})
select函数中简化的代码是:
select: function (startDate, endDate, allDay) {
console.log("Start date:"+ startDate.format());
console.log("End date:"+ endDate.format());
}
所以点击一天后td
就会返回
开课日期:2014-06-26 - 截止日期:2014-06-27
我认为它将返回的是相同的开始和结束日期。我错了吗? 有什么想法吗?