我有一个 Google 日历
,共享一个与 FullCalendar
一起使用的特定日历,但我无法在我的 Google 日历
中创建事件> 来自
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 Calendar API 。为此,您将需要后端编程语言,请点击链接,您将找到解决方案。
关于javascript - 我的 FullCalendar 无法创建 Google 事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30202761/