Ricardo Alves
Ricardo Alves

Reputation: 561

My FullCalendar cannot create a Google Event

I have a Google Calendar sharing a specific calendar all set working with FullCalendar, but I am unable to create an event to my Google calendar from

FullCalendar code is:

$('#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
}

To read the events and edit them it works fine, the gcal.js is the most updated and the FullCalendar too.

Upvotes: 0

Views: 242

Answers (1)

valar morghulis
valar morghulis

Reputation: 2017

You cannot create an google event using fullcalendar its only used to display events fetched from your google calendar. In order to save events to your google calendar you will have to use Google Calendar API. And For this you will be requiring an backend programing language, Please follow the link and you will find out the solution.

Upvotes: 1

Related Questions