ตัวอย่างตามโค๊ดด้านล่างครับ
You can easily do this using available fullcalendar methods.
loading – triggers when events fetching starts
eventAfterAllRender – Triggered after all events have finished rendering.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
// page is now ready, initialize the calendar... $('#calendar').fullCalendar({ loading: function (bool) { $("#loading").show(); // Add your script to show loading }, eventAfterAllRender: function (view) { $("#loading").hide(); // remove your loading }, defaultView: 'month', eventSources: [ // your event source { url: 'feed.php', // use the `url` property color: 'yellow', // an option! textColor: 'black' // an option! } // any other sources... ] }); |
ที่มา : https://stackoverflow.com/a/30297283
ป้ายกำกับ:fullCalendar