我今天刚下载 FullCalendar,我一直在尝试将 JSON 日历与 gcal 相结合。除了我的 JSON 数据之外,我还想显示国定假日,有人可以告诉我这是否可行。
我试过了,还是不行。谢谢!
$(文档).ready(函数() {
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,basicWeek,basicDay'
},
editable: true,
events: "json-events.php",
$.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic'),
loading: function(bool) {
if (bool) $('#loading').show();
else $('#loading').hide();
}
});
});
最佳答案
我找到了 answer here .我将事件替换为 eventSources。以防其他人正在寻找同样的东西。
eventSources: [
"json-events.cfm",
$.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic')
]
关于javascript - 结合 JSON 和 GCAL 的 jQuery FullCalendar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3322602/