开发者

Dividing days into several sections in 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?


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


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜