我有一个Google Calendar
共享特定日历,所有设置都与FullCalendar
一起使用,但是我无法从
Google calendar
创建事件fullcalendar代码是:
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
allDay: true,
editable: true,
eventLimit: false,
selectable: true,
selectHelper: true,
dayClick: function(start, end, allDay) {
var title = prompt('Create an event:');
if (title) {
calendar.fullCalendar('renderEvent', {
title: title,
start: start,
end: end,
allDay: allDay
},
true // make the event "stick"
);
}
calendar.fullCalendar('unselect');
},
googleCalendarApiKey: 'AIzaSyA2obQBQF_npk4rq-nU-X5kYfIkuWsBJkY',
events: {
googleCalendarId: 'efxpromedia.com_jvm3li2c2jva0f9hd89lt5hikg@group.calendar.google.com',
},
eventClick: function(event) {
// opens events in a popup window
window.open(event.url, 'gcalevent', 'width=800,height=700');
$(this).css('border-color', 'red');
return false;
},
}); //CALENDAR
}
要读取事件并编辑它们,它可以正常工作,gcal.js也是最新的,也是FullCalendar。
您无法使用fullcalendar
创建Google事件,仅用于显示从Google日历中获取的事件。为了将事件保存到您的Google日历,您将必须使用Google Calendar API。为此,您将需要使用后端编程语言,请点击链接,您将找到解决方案。