How to only view business hours in a fullCalendar agenda view
Are you asking how to hide hours outside of business hours? If so, use the minTime and maxTime options:
http://fullcalendar.io/docs/agenda/minTime/
http://fullcalendar.io/docs/agenda/maxTime/
for instance, for a 9am - 5pm calendar:
$(document).ready(function() {
$('#calendar').fullCalendar({
...
minTime: "09:00:00",
maxTime: "17:00:00",
...
});
});
Addition to minTime and maxTime setting as @scottysmalls mentioned, adding height: 'auto',
will help to remove blank area at the bottom.
For FullCalendar v5, minTime
and maxTime
are both renamed. So, please use accordingly.
minTime
is renamed to slotMinTime
maxTime
is renamed to slotMaxTime
For further reference: Upgrading from FullCalendar to V5