J Cornelius
J Cornelius

Reputation: 23

FullCalendar shows all google calendar events at current time and date

Instead of showing our events, FullCalendar creates elements starting at the current date/time. I've tried this with multiple google calendars (public, custom, etc) and always get the same result.

$('#calendar').fullCalendar({
    eventSources: [{
        url:'https://www.google.com/calendar/feeds/jcornelius.com_e9lk2eh1p3tdn3v775l0e0v48g%40group.calendar.google.com/public/basic',
        dataType : 'jsonp'
    }]
});

enter image description here

See this fiddle to reproduce the issue.

http://jsfiddle.net/jcornelius/pba56nf1/

Upvotes: 0

Views: 648

Answers (2)

J Cornelius
J Cornelius

Reputation: 23

Turns out the permissions issue was an error with the Google calendar. I contacted Google support and they reset the permissions. Now with Richard Hermanson's answer above everything works.

Upvotes: 1

Updated your sources and at least the example data works. Yours on the other hand seem to be invalid data or something? I'll try to help if the problem persists.

http://jsfiddle.net/pba56nf1/2/

$(document).ready(function() {

    $('#calendar').fullCalendar({

        events: 'http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic',
        //events: 'https://www.google.com/calendar/feeds/jcornelius.com_e9lk2eh1p3tdn3v775l0e0v48g%40group.calendar.google.com/public/basic',
        eventClick: function(event) {
            // opens events in a popup window
            window.open(event.url, 'gcalevent', 'width=700,height=600');
            return false;
        },

        loading: function(bool) {
            $('#loading').toggle(bool);
        }

    });

});

Upvotes: 0

Related Questions