Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fullcalendar change columns to row

there is a way to change the display of fullcalendar to show the days (Sunday, Monday,...) in the vertical axis and the time in the horizontal axis, I have to show that way to my client.

Regards.-

like image 674
pepo Avatar asked Sep 01 '11 15:09

pepo


1 Answers

There is no designated way to do that. But you can do it yourself.

Fullcalendar view is shown as table with the following structure:

<tr class="fc-week0 fc-first" style="">
  <td class="fc-sun fc-widget-content fc-day0 fc-first fc-other-month">…</td>
  <td class="fc-mon fc-widget-content fc-day1 fc-other-month">…</td>

As you can see there is a row for each weak, and a cell for each day.

You have 2 options to accomplish what you want:

  1. Modify the plugin source. The view is rendered in BasicView.js. Just change the lines 140 and below and "substitute" td <-> tr.

  2. Write some extra code to reorder the elements. Write a small and simple script which gets called as soon as the calendar is inserted into DOM. The script has to rebuild your table in the order you like.

like image 84
gorootde Avatar answered Oct 12 '22 07:10

gorootde