2015-12-18 101 views

回答

0

如果要更改每个时间段行的高度,可以覆盖css类。

.fc-agenda-slots td div { 
    height: 40px !important; 
} 

或(对于我的日程没有sheduler)

.fc-time-grid .fc-slats td { 
     height: 1.0em; .. } 

你可以找到它在fullcalendar CSS

的第五行对于事件高度: FullCalendar - Change event (appointment, diary entry) height

+0

对于迟到的回复感到抱歉,但在渲染cal之后,没有类fc-agenda-slots或fc-time-grid存在... – cwhisperer

1

我曾遇到这个问题并且使用了这个

  1. 在乌尔.css文件

.fc-resized-row { height: 24px !important; }

定义一个类名称
  • 展开接fullcalendar调度eventRender事件
  • eventRender: function(event, element, view) { 
     
         $(".fc-rows table tbody tr .fc-widget-content div").addClass('fc-resized-row'); 
     
         $(".fc-content table tbody tr .fc-widget-content div").addClass('fc-resized-row'); 
     
         $(".fc-body .fc-resource-area .fc-cell-content").css('padding', '0px'); 
     
         },

    希望这可以帮助任何遇到此问题的人。

    干杯!

    +1

    使用'eventAfterAllRender'触发器而不是'eventRender ',因为在视图中的每个事件上都调用了eventRender,并且在呈现所有内容(这个'eventAfterAllRender'完全适合)之后,只需要调用一次给定的代码。 – jox