Currently, I am exploring the Google Calendar API and struggling with implementing a Quick Add Event using javascript. Is it possible to achieve this task? Are there any resources or examples that can help me understand how to do it?
My issue lies in the fact that instead of creating an event for tomorrow at 10am named "Coffee", the code I have written sets the event for the time of posting and places "Coffee tomorrow 10am" in the description field.
function createEvent() {
var calendarService = new google.gdata.calendar.CalendarService('GoogleInc-jsguide-1.0');
var feedUri = 'http://www.google.com/calendar/feeds/my-calendar-url/private/full';
var entry = new google.gdata.calendar.CalendarEventEntry();
entry.setContent(new google.gdata.atom.Text.create("Coffee tomorrow 10am"));
entry.setQuickAdd(true);
var callback = function (result) {
$('#panel').html('event created!');
}
var handleError = function (error) {
$('#panel').html(error);
}
calendarService.insertEntry(feedUri, entry, callback, handleError, google.gdata.calendar.CalendarEventEntry);
}
I would appreciate any guidance on what errors I might be making and where I am proceeding correctly.
Thank you!
-alex-