Search code examples
fullcalendar

Can the default timeslot height be set in FullCalendar?


It looks like the default is 20px, but I was hoping to bump this up, so an event that is the length of 1 timeslot would be able to show the event header and body. Currently when an event is the length of 1 timeslot only the event header is shown.


Solution

  • In fullcalendar.css you can change this line to adjust the timeslot height

    .fc-agenda-slots td div { height: 20px; }
    

    So if you your shortest event is half the timeslot length (30min event, but 1hr timeslot) you would double this value


    CAVEAT: As pointed out by jjnguy this change will break the drag/drop and resize functionality. It solves the problem of changing the default timeslot height though.