我一直在开发一个 Web 应用程序,它需要一个日历来显示事件及其相关信息。我一直在用full calendar API为我处理日历。但是,每当我有一个跨越多天的事件时,日历都不会在每一天呈现该事件。它只会在第一天显示事件,然后在下一个星期天再次显示,这对我来说没有意义。我知道完整的日历支持这一点,因为我在他们的网站上看到了一个例子,但我不知道我做错了什么。
这就是我初始化日历和插入事件的方式
$(document).ready(function(){
//initialize calendar
$('#calendar').fullCalendar({
//options and callbacks
// your event source
eventSources: [
{
events: [ // put the array in the `events` property
{
title : 'event1',
start : '2016-01-15T23:59',
end : '2016-01-21T00:01',
isMultipleDay: true
}
],
color: 'blue', // an option!
textColor: 'yellow', // an option!
nextDayThreshold: "00:01"
}
// any other event sources...
]
});
});
最佳答案
在他们游戏的示例中,他们省略了时区数据。
请尝试以下操作:
events: [{
title : 'event1',
start : '2016-01-15',
end : '2016-01-21',
}]
关于javascript - 完整的日历事件不会跨越多天,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34866149/