Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dividing days into several sections in FullCalendar

Tags:

fullcalendar

I want to divide days into sections, for example there are a lot of events in one day, and they take place in different rooms (A, B, C), I want to divide each days into columns A, B, C to separate events from different rooms. There is any way to do this?

like image 653
brooklyn Avatar asked Dec 15 '25 14:12

brooklyn


1 Answers

I had the same prerequesites and I will do this way:

In fullcalendar options:

  • Create a fullcalendar "control" with title, prev, next and today.
  • Create N fullcalendar "events" without navigation, and set each title to each room.

You should apply some tricks to render nice calendars :

  • Calendar "control": hide body fc-content (CSS display:none)
  • Second Calendar and: hide left axis fc-agenda-axis (CSS width: 0px)

In your data and js handling:

  • Fullcalendar "control" must control all others calendars (see How do I set the date of a calendar view from another view using Jquery FullCalendar? )
  • Load events from Room A to Calendar A, Room B to Calendar B, etc.

You can start with this jsfiddle : http://jsfiddle.net/8ZM4x/1/

And then replace events source with yours :

$('#mycalendar1').fullCalendar(
            {
                    events: [     
                          ...
                    ]
           }); 
like image 177
Doomsday Avatar answered Dec 19 '25 07:12

Doomsday