I was wondering if there was a way in Arshaw\'s FullCalendar to: 1- Change the calendar from showing weekends to not show weekends and vice versa. 2- To dynamically change t
For toggling weekends:
$('#calendar').fullCalendar({
//defaultView: 'agendaWeekdays',
header: {
right: 'month,monthWeekdays,agendaWeek,agendaWeekdays'
},
views: {
agendaWeekdays: {
buttonText: 'Weekdays',
type: 'agendaWeek',
weekends: false
},
monthWeekdays: {
buttonText: 'Month (Weekdays)',
type: 'month',
weekends: false
}
}
});
As for slot duration, you could destroy the calendar and create it again with the slotDuration property changed.
Alternatively, you could create more Custom Views, each with different slotDurations. You wouldn't need to add buttons for these views to the header but instead create your own UI for slot duration that calls your custom views.
$('#calendar').fullCalendar('changeView', 'agendaWeekdaysSlotDuration15');