jquery - Fullcalendar.js custom start date in Weekview? -
basically show today first day of week in week view of fullcalendar js. have tried find right method in docs without luck. however, abusing firstday firstday: 19 today (2015-04-24) achieve (week starting today):

since cannot correct way, know correct solution here. tried defaultdate , gotodate, did not work.
to set current day beginning of week use firstday: (new date().getday()),.
$('#calendar').fullcalendar({ header: { left: 'prev,next today', center: 'title', right: 'agendaweek' }, defaultdate: '2015-04-25', // not setting friday first day in weekview editable: false, defaultview: 'agendaweek', firstday: (new date().getday()), // returns day number of week, works! timeformat: 'hh:mm', lang: 'de', columnformat: 'dddd d.m.', alldayslot: false, slotduration: '00:30:00', // default 30 min mintime: '12:00:00', maxtime: '23:00:00', contentheight: 600, events: [ { title: 'test', start: '2015-04-25t14:00:00', end: '2015-04-25t21:00:00', dow: [4], // repeat same weekday rendering: 'background', color: '#6ba5c2' }, ], timezone: 'local', // ... }); // end fullcalendar
Comments
Post a Comment