change full calendar default view to month. when changing slot minutes now reinits to view you were last looking at.

This commit is contained in:
Naomi 2011-02-02 11:46:17 -05:00
parent d577483800
commit ec9d84fc91
3 changed files with 3 additions and 2 deletions

View File

@ -117,7 +117,7 @@ $(document).ready(function() {
center: 'title', center: 'title',
right: 'agendaDay, agendaWeek, month' right: 'agendaDay, agendaWeek, month'
}, },
defaultView: 'agendaDay', defaultView: 'month',
editable: false, editable: false,
allDaySlot: false, allDaySlot: false,
axisFormat: 'H:mm', axisFormat: 'H:mm',

View File

@ -41,6 +41,7 @@ function viewDisplay( view ) {
var opt = view.calendar.options; var opt = view.calendar.options;
opt.slotMinutes = parseInt(x); opt.slotMinutes = parseInt(x);
opt.events = getFullCalendarEvents; opt.events = getFullCalendarEvents;
opt.defaultView = view.name;
$(calendarEl).fullCalendar('destroy'); $(calendarEl).fullCalendar('destroy');
$(calendarEl).fullCalendar(opt); $(calendarEl).fullCalendar(opt);
}); });

View File

@ -199,7 +199,7 @@ $(window).load(function() {
center: 'title', center: 'title',
right: 'agendaDay, agendaWeek, month' right: 'agendaDay, agendaWeek, month'
}, },
defaultView: 'agendaDay', defaultView: 'month',
editable: false, editable: false,
allDaySlot: false, allDaySlot: false,
axisFormat: 'H:mm', axisFormat: 'H:mm',