0
votes

I am trying to change day start time in fullcalendar without cutting any hours of the day in agendaWeek and agendaDay views
what I am doing is :

$('#calendar').fullCalendar({
  minTime: "08:00:00" //8am
});

but the hours between 00:00 - 8:00 are not showing at all in the calendar view I tried to do

$('#calendar').fullCalendar({
  minTime: "08:00:00", //8am
  maxTime: "07:00:00" //7am
});

but this config is showing nothing.
am I missing something ?
or is it something in the fullcalendar's implementation where minTime and maxTime options have specific range of values ?


here is a fiddle

2

2 Answers

2
votes

I needed this functionality myself so I implemented a dayBreakTime option in my fork: https://github.com/matiaslarsson/fullcalendar

This will allow you to select at what time the calendar columns will break for a new day. Just add the option dayBreakTime: "08:00:00" to make the day columns span from 08:00 to 08:00 the next day, like this;

$('#calendar').fullCalendar({
   header: {
      left: 'prev,next today',
      center: 'title',
      right: 'month,agendaWeek,agendaDay'
   },
   defaultView: 'agendaWeek',
   dayBreakTime: "08:00:00",
   ...
});

Please check the documentation and star the issue at https://code.google.com/p/fullcalendar/issues/detail?id=2541 if you'd like the functionality in the main FullCalendar branch.

0
votes

FullCalendar accepts time in 00:00:00 to 23:59:59 format and in your case, it doesn't work because your maxTime is lesser than minTime. You need to change your maxTime to

maxTime: "19:00:00"