drccfl9407 2011-05-30 22:37
浏览 16

页面加载时未显示的事件

I'm using Fullcalendar called via json and something really weird is happening and this is killing me! Can't find a workaround for it.

I have my calender under a tab. When I click on that tab, the calendar grid shows up, but with no events. If I hit the calendar Next Month and then back to Previous Month, the events all display properly!

If I navigate to another page and then come back to the calendar page, the same thing happens. Have to go next and previous for the events to load.

This is how I am calling the calendar:

$(document).ready(function() {
    $('#calendar').fullCalendar({
        editable: false,
        events: "../events_calendar.php",
        loading: function(bool) {
            if (bool) $('#loading').show();
            else $('#loading').hide();
        }
    }); });

Any ideas here??

Thanks.

  • 写回答

3条回答 默认 最新

  • dongqu1783 2011-05-31 15:21
    关注

    There could be an issue with the calender being hidden when the page loads.

    So you can try to rerender the event http://arshaw.com/fullcalendar/docs/event_rendering/rerenderEvents/

    .fullCalendar( 'rerenderEvents' )
    

    or

    To make certain the events are ok you should wire in a refetchEvent http://arshaw.com/fullcalendar/docs/event_data/refetchEvents/

    .fullCalendar( 'refetchEvents' )
    

    Both those events should be called when the calendar shows and is ready for example.. not before as it could have the same problem.

    and

    I think there was an issue with this somewhere already-- but it could have been solved in the newest version. But i cannot find it now. Try and search the bugs at support

    http://code.google.com/p/fullcalendar/issues/list?can=1&q=

    Other than that you will have to try and tweak the way the calendar loads etc...

    评论

报告相同问题?

悬赏问题

  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 个人网站被恶意大量访问,怎么办
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制