javascript - jQuery fullCalendar - calendar not showing on load in tabs -
i'm working jquery fullcalendar show calendar. i'm working jquery tabs have multiple tabs.
i want show callendar in first tab. have in jquery code:
$(document).ready(function(){ $("#reservatiestabs").tabs(); if($('#calendar').length) { var dbevents = <?php echo $events; ?>; var calevents = getevents(dbevents); var calendar = $('#calendar').fullcalendar({ left: 'title', center: '', right: 'prev,next', weekends: false, defaultview: 'month', defaultdate: moment(), events: calevents, eventclick: function(calevent, jsevent, view) { displayevent(calevent, calendar); } }); } });
the problem calendar isn't loaded when page loaded. buttons loaded not calendar.
update:
i've tried following:
$(document).ready(function(){ $( "#reservatiestabs" ).tabs({ create: function( event, ui ) { var dbevents = <?php echo $events; ?>; var calevents = getevents(dbevents); var calendar = $('#calendar').fullcalendar({ left: 'title', center: '', right: 'prev,next', weekends: false, weeknumbers: true, weeknumbercalculation: "iso", defaultview: 'month', defaultdate: moment(), events: calevents, eventclick: function(calevent, jsevent, view) { displayevent(calevent, calendar); } }); }}); });
but no difference ... .
Comments
Post a Comment