如何在完整日历中插入西班牙语Google日历?

时间:2016-10-04 11:49:24

标签: jquery fullcalendar

我需要在完整日历中插入节日。我有一个完整的日历与一些事件,我必须插入节日。谷歌日历是:es.spain#holiday@group.v.calendar.google.com。

我正在努力做到这一点,但我无法做到。我有这个代码,但事件没有加载:

$('#calendar').fullCalendar({
            lang : 'es',
            witdh : "100%",
            header : {
                left : 'prev,next today',
                center : 'title',
                right : 'month,agendaWeek,agendaDay'
            },
            googleCalendarApiKey : '642280338060-ocq7lmaa1boo8c9na8e0vp5l0a68itus.apps.googleusercontent.com',
            events : {
                googleCalendarId : 'es.spain#holiday@group.v.calendar.google.com',
            }
        });

我按照https://fullcalendar.io/docs/google_calendar/上的所有说明操作。

提前致谢。

1 个答案:

答案 0 :(得分:0)

修改来自https://fullcalendar.io/js/fullcalendar-3.0.1/demos/gcal.html的Google日历演示。您发布的API密钥看起来不合适(不是您应该在此处发布您的个人API密钥)

$('#calendar').fullCalendar({
    googleCalendarApiKey: 'YOUR_API_KEY_HERE',

    // Spain Holidays
    events: 'es.spain#holiday@group.v.calendar.google.com',

    eventClick: function(event) {
        // opens events in a popup window
        window.open(event.url, 'gcalevent', 'width=700,height=600');
        return false;
    }
});