I have implemented FullCalendar on the Twitter Bootstrap tab in a JS application written in Ember. The contents of the tab contains the following Handles.
<div class="container-fluid">
<div class="row-fluid">
<div class="commands pull-left">
<input type="text" placeholder="Display Calendar for" data-provide="typeahead">
</div>
<div class="commands pull-right">
<a {{bindAttr class=":btn :btn-primary"}} href="#" {{action "newEvent"}}><i class="icon-plus icon-white"></i> Add Event</a>
</div>
</div>
<hr/>
<div class="row-fluid">
{{#view App.CalendarTool id="calendar" class="calendar"}}
{{/view}}
</div>
</div>
The App.CalendarTool class is defined as follows:
require('fullcalendar/fullcalendar');
require('fullcalendar/gcal');
App.CalendarTool = Em.View.extend({
tagName:'div',
attributeBindings:['id','events','owner'],
classNamesBindings:['class'],
didInsertElement:function(){
this.$().fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay '
},
editable: true,
events: []
});
}
});
When the page loads, the full calendar does not fit. Only the buttons above go up. When I click today, the full calendar appears.
JSFIddle - http://jsfiddle.net/uMVyu/
source
share