jQuery FullCalendar click 'next' event notificatin

前端 未结 3 682
我寻月下人不归
我寻月下人不归 2020-12-21 11:18

How can i get notified when the user click on \'next\' (arrow) ? I\'m using the calendar in month view and I want to load the next month data on demand. Also, do smbdy has a

3条回答
  •  渐次进展
    2020-12-21 11:25

    Your way of approaching is wrong. You may need to write an API which returns the list of calendar objects in JSON, and use the following options.

    $('#calendar').fullCalendar({
        events: '/myfeed.php'
    });
    

    Then, fullcalendar will automatically call /myfeed.php whenever it needs. e.g. If a user clicks 'prev' or 'next' month button.

    Here's the example URL fullcalendar will generate :

    /myfeed.php?start=1262332800&end=1265011200&_=1263178646
    

    For more information, please visit the following URL. http://arshaw.com/fullcalendar/docs/event_data/events_json_feed/

提交回复
热议问题