I am working on jquery fullcalendar plugin. This plugin, by default, shows entire and week. However, I want to display only week and day. I changed the options for this so that when user loads page then it shoudl automatically load week calendar but it still loads month and to view week user has to click on week tab to see it. How can I change this default behavior so that user see week calendar when he loads website?
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'agendaWeek,agendaDay',
ignoreTimezone: false
},
selectable: true,
selectHelper: true,
editable: true,
events: 'events'
});
Just add defaultView: 'basicWeek'
to your fullCalendar option:
$('#calendar').fullCalendar({
defaultView: 'basicWeek'
});
Check the documentation
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.