2016-11-30 23 views
3

我有一個自定義日曆,並與FullCalendar版本1一起工作。現在,我已更新到版本3.我更新了CSS和設置以匹配我以前的內容,但無法找到調整方式月視圖中的日間高度。在fullcalendar中調整日高度?

左側是舊顯示屏,右側是新顯示屏,其中天細胞太高。

enter image description here

我會做在CSS,但周的高度動態通過代碼設置成應該是可調的。

舊版本導致了這一點:

enter image description here

和新版本的結果是:

enter image description here

我怎麼知道我想要什麼碼?

+0

這樣做的例程似乎是'distributeHeight',但我還沒有(確定)如何使它做到這一點。 –

回答

2

已解決。原來需要兩個設置。

在CCS,使min-height較小:

.fc-body .fc-row { min-height: 45px; } 

而在代碼中,的aspectRatio更改爲新的 '魔力' 數量:不先降低min-height

.fullCalendar({ 
    aspectRatio: 1.09 
}); 

更改aspectRatio不會導致高度低於min-height