I set the full calendar to be display on a tab. When loading the page, depending the event start and end date I want to set the default view of the calendar. But after creating full calendar the event is undefined. The event is loaded through ajax call, but at that point the function it's not called.
Thank you!
here is how the page looks :
<div class="main-container"> here are inputs, datepickers<div>
<div class="tabs-container">
<div class="tab1">some info(when load page it is the tab displayed)</div>
<div class="tab2">schedule(it's hide when load page)</div>
</div>
through the inputs and datepickers(start date time, end date time) from the main container I display/update on the schedule, so it can be added a new event or edit event through the controls from the main container.
$(document).ready(function () {
var caloption = $("#calendar")
.fullCalendar({
groupByDateAndResource: true,
resources: getScheduleResources,
events: getScheduleEvents
});
caloption.option.defaultView = //method try to get event start time and end time in order to see the difference between days eg. if there is a difference of 6 days the defaultView should be timelineWeek
$("#calendar").fullCalendar(caleoption);
But the event is undefined because on loading page or until not showing the tab(ie click the tab which contains schedule) getting events, resources it's not done.