Dividing days into several sections in FullCalendar

前端 未结 2 1964
南旧
南旧 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:26

    There is a fork of the fullCalendar library that will provide this functionality - they call it a Resource View.

    http://tux.fi/~jarnok/fullcalendar-resourceviews/

    Check out my answer to this thread for more information.

    0 讨论(0)
  • 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: [     
                              ...
                        ]
               }); 
    
    0 讨论(0)
提交回复
热议问题