我正在根据来自json输入的日期制作日历。问题是即使我的json数据没有重复的日期。其在一天中显示两个具有相同日期时间的广告位。我也尝试将日历设为24小时支持的日历,但是问题仍然存在
http://jsfiddle.net/xpsg9pa4/28/
我正在使用的js日历代码。
$('#calendar').fullCalendar({
header: {
left: 'prev',
center: 'title',
right: 'next'
},
defaultView:'agendaWeek',
weekNumberCalculation:'ISO',
defaultDate: new Date(),
selectable: false,
editable: false,
validRange: {
start: moment(new Date(Date.now() + 24 * 60 * 60 * 1000)).format('Y-MM-DD')
},
weekNumbersWithinDays: true,
navLinks: false, // can click day/week names to navigate views
eventLimit: true, // allow "more" link when too many events
events:[{"title":"17:30","start":"2018-09-27 17:30"},{"title":"18:30","start":"2018-09-27 18:30"},{"title":"19:30","start":"2018-09-27 19:30"},{"title":"20:30","start":"2018-09-27 20:30"},{"title":"21:30","start":"2018-09-27 21:30"},{"title":"22:30","start":"2018-09-27 22:30"},{"title":"23:30","start":"2018-09-27 23:30"},{"title":"00:30","start":"2018-09-28 00:30"},{"title":"01:30","start":"2018-09-28 01:30"},{"title":"02:30","start":"2018-09-28 02:30"},{"title":"15:30","start":"2018-09-28 15:30"},{"title":"17:30","start":"2018-09-28 17:30"},{"title":"18:30","start":"2018-09-28 18:30"},{"title":"19:30","start":"2018-09-28 19:30"},{"title":"20:30","start":"2018-09-28 20:30"},{"title":"21:30","start":"2018-09-28 21:30"},{"title":"22:30","start":"2018-09-28 22:30"},{"title":"23:30","start":"2018-09-28 23:30"},{"title":"00:30","start":"2018-09-29 00:30"},{"title":"01:30","start":"2018-09-29 01:30"},{"title":"02:30","start":"2018-09-29 02:30"},{"title":"15:30","start":"2018-09-29 15:30"},{"title":"17:30","start":"2018-09-29 17:30"},{"title":"18:30","start":"2018-09-29 18:30"},{"title":"19:30","start":"2018-09-29 19:30"},{"title":"20:30","start":"2018-09-29 20:30"},{"title":"21:30","start":"2018-09-29 21:30"},{"title":"22:30","start":"2018-09-29 22:30"},{"title":"23:30","start":"2018-09-29 23:30"},{"title":"00:30","start":"2018-09-30 00:30"},{"title":"01:30","start":"2018-09-30 01:30"},{"title":"02:30","start":"2018-09-30 02:30"},{"title":"17:30","start":"2018-09-30 17:30"},{"title":"18:30","start":"2018-09-30 18:30"},{"title":"19:30","start":"2018-09-30 19:30"},{"title":"20:30","start":"2018-09-30 20:30"},{"title":"21:30","start":"2018-09-30 21:30"},{"title":"22:30","start":"2018-09-30 22:30"},{"title":"23:30","start":"2018-09-30 23:30"},{"title":"00:30","start":"2018-10-01 00:30"},{"title":"01:30","start":"2018-10-01 01:30"},{"title":"02:30","start":"2018-10-01 02:30"}]
});
2018-09-28 23:30
之类的槽位被重复两次
答案 0 :(得分:0)
我认为的问题是,如果您不为活动指定结束时间,那么它将结束时间视为+2小时, 如果您指定结束时间,它应该可以正常工作。