Dividing days into several sections in FullCalendar

前端 未结 2 1963
南旧
南旧 2021-01-06 17:48

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 colu

2条回答
  •  情话喂你
    2021-01-06 18:40

    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: [     
                              ...
                        ]
               }); 
    

提交回复
热议问题