如何在运行中切换JSON eventSource?

时间:2011-11-02 18:23:53

标签: fullcalendar

我在我的代码中使用JSON事件源。如何在现有日历上切换“evenDatasource”?背后的想法是添加切换到页面,以允许用户选择日历数据源而无需重新加载。我只需要在运行中切换eventSource。我该怎么办?

  

$( '#日历')。fullCalendar({

eventSources: [

    // your event source
    {
        url: '/myfeed.php', // use the `url` property
        color: 'yellow',    // an option!
        textColor: 'black'  // an option!
    }

    // any other sources...

]
     

});

1 个答案:

答案 0 :(得分:0)

结帐events as functions。如果你的开关叫 .fullCalendar( 'refetchEvents' )关于更改,您的事件函数会读取要从交换机获取的事件,您应该没问题。

相关问题