Fullcalendar jquery插件高度问题 [英] Fullcalendar jquery plugin height issue
问题描述
我在网页中整合了fullcalendar,但由于某种原因,我通过插件中的'height'属性应用的高度仅适用于MonthView。
: var calendarOptions = {
主题:true,
defaultView:'agendaWeek',
allDaySlot:false,
allDayText:'all-day',
height:($(window).height()) - ($(div.calendarTitle)。offset() ,
firstHour:7,
firstDay:1,
slotMinutes:30,
defaultEventMinutes:120,
axisFormat:'H:mm',
。 ....
基本上,($(window).height( ) - ($(div.calendarTitle)。offset()。top)
旨在覆盖给定的区域。
I想知道是否有其他人经历过我或者对我如何克服它有任何想法。我所希望的就是获得相同的高度,无论是月视图,日视图还是周视图。
现在,周和日视图覆盖了页面的70%。
$('#calendar')。fullCalendar('option','height',700);
另一种方法(用于DayView)提供在 这个问题的答案 。 b
$ b
I integrated fullcalendar within a webpage but for some reason, the height I applied through the 'height' property available within the plugin only works for MonthView.
The code:
var calendarOptions = {
theme: true,
defaultView: 'agendaWeek',
allDaySlot: false,
allDayText: 'all-day',
height: ($(window).height()) - ($("div.calendarTitle").offset().top),
firstHour: 7,
firstDay: 1,
slotMinutes: 30,
defaultEventMinutes: 120,
axisFormat: 'H:mm',
.....
Basically, the ($(window).height()) - ($("div.calendarTitle").offset().top)
is intended to cover the given area.
I would like to know whether anybody else experienced this issue or has any idea about how I can overcome it. All I want is to get the same height, regardless of month view, day view or week view.
Right now, week and day view cover 70% of the page.
Have you tried dynamically setting it after initialization?
$('#calendar').fullCalendar('option', 'height', 700);
Another approach (for DayView) is provided in this question's answers on stack.
You can also try an approach like this (the last entry) for WeekView.
这篇关于Fullcalendar jquery插件高度问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!