【问题标题】:How Do I Associate FullCalendar Resource With EventSources from Google Calendar?如何将 FullCalendar 资源与 Google 日历中的 EventSources 关联?
【发布时间】:2016-10-24 23:02:27
【问题描述】:

我搜索了文档,但没有发现将 FullCalendar 资源与 Google 日历中的事件源相关联。

这是相关代码:

resources: [
            { id: 'room01', title: 'Room 1' },
            { id: 'room02', title: 'Room 2' },
            { id: 'room03', title: 'Room 3' },
            { id: 'room04', title: 'Room 4' }
        ],
        eventSources: [
           {
               id: 'e1',
               resourceId: 'room01',
               googleCalendarId: '[GOOGLE CALENDAR ID #1]'
           },
           {
               id: 'e2',
               resourceId: 'room02',
               googleCalendarId: '[GOOGLE CALENDAR ID #2]'
           }
        ],

请帮忙:-)

【问题讨论】:

    标签: fullcalendar fullcalendar-scheduler


    【解决方案1】:

    因为您可以将任何事件与任何事件相关联,关于 google 日历的具体部分我无法真正回答,但是从您在此处显示的内容(即,将 googleCalendarId 添加到您的事件中),我在想您可能是什么寻找的是下一个难题,即 eventClick 部分?

    对于你所拥有的,我认为这看起来像:

            eventClick: function(calEvent) {
                if (calEvent.googleCalendarId) {
                    var edit_url = "/url_to_get_to_the_google_calendar/" + calEvent.googleCalendarId + "/";
                    window.open(edit_url,"_self");
                    return false;
                }
            },
    

    我使用与您在上面显示的相同的技术向我的事件添加各种关联,然后简单地添加 eventClick 代码(它只会在您的日历页面条目中遵循您上面的代码) - 除了我在方法中添加我的数据调度程序views.py 方法......但它是相同的概念!

    这有帮助吗?我不清楚您实际上需要什么帮助!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-03-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-19
      • 2012-01-03
      • 1970-01-01
      相关资源
      最近更新 更多