Fullcalendar 全日历固定行高
如何设置fullcalendar中行的固定高度?我想有垂直滚动条,如果有太多的事件Fullcalendar 全日历固定行高,fullcalendar,Fullcalendar,如何设置fullcalendar中行的固定高度?我想有垂直滚动条,如果有太多的事件 $('#calendar').fullCalendar('option', 'contentHeight', 50); 如果要更改每个时隙行的高度,可以重写css类 .fc-agenda-slots td div { height: 40px !important; } 如果你有别的意思,请告诉我们 contentHeight仅用于计算日历的高度 在我的脚本中,我想使行变小,但您可以使用相同的代码使
$('#calendar').fullCalendar('option', 'contentHeight', 50);
如果要更改每个时隙行的高度,可以重写css类
.fc-agenda-slots td div {
height: 40px !important;
}
如果你有别的意思,请告诉我们
contentHeight仅用于计算日历的高度 在我的脚本中,我想使行变小,但您可以使用相同的代码使行变大。当使行变小时,我必须合并第一列的每4个单元格(在15分钟粒度内工作时),以使小时指示适合单元格。使用以下代码合并单元格:
$(function(){
// Merge first column, each 4 rows to display time in larger format
$('table.fc-agenda-slots tbody tr:not(.fc-minor)').each(function(){
$(this).find("th:first-child").css("font-size", "12px").attr('rowSpan',4); //
$(this).nextUntil("tr:not(.fc-minor)","tr.fc-minor").find("th:first-child").remove();
});
})
然后,使用CSS应用正确的行高度。请注意,我添加了线条高度样式,这是与引导兼容所必需的。我还确保在日历之外拖动时,默认选择行为不适用
body {
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
user-select: none;
}
.fc-agenda-slots td div {
height: 6px;
line-height: 6px;
}
.fc-agenda-axis {
font-size:1px;
line-height: 1px;
}
对我来说,只有这样才有效
.fc-agendaWeek-view tr {
height: 40px;
}
.fc-agendaDay-view tr {
height: 40px;
}
我使用月视图,如果我为.fc view month td div设置了高度,我不会得到垂直滚动条,只有固定的行。如果你设置了高度和溢出:auto to.fc view month类,你可以获得滚动条。但它也会滚动标题。我需要在每个单元格上使用滚动条(如果内容扩展高度),而不是在整个表上,如果我在fc day内容类上设置高度和溢出,这是一样的。你能做到吗?如果是,请告诉我怎么做?@MaulikVora我没有得到我想要的,我只是用没有自动高度设置的jQuery Frontier日历替换了这个日历。contentHeight是设置日历的视图区域高度的一个选项。请参阅