Jquery 具有超长资源的完整日历调度程序
我无法显示垂直调度程序 这就是我正在使用的:Jquery 具有超长资源的完整日历调度程序,jquery,fullcalendar,fullcalendar-scheduler,Jquery,Fullcalendar,Fullcalendar Scheduler,我无法显示垂直调度程序 这就是我正在使用的: $('#timetable').fullCalendar({ schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives', editable: true, resourceAreaWidth: "100px", defaultView: 'timelineMonth', slotLabelFormat
$('#timetable').fullCalendar({
schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
editable: true,
resourceAreaWidth: "100px",
defaultView: 'timelineMonth',
slotLabelFormat: ['MMMM','D'],
eventAllow: function(dropLocation, draggedEvent) {
var originalEvent = $('#timetable').fullCalendar('clientEvents', draggedEvent.id)[0]
return dropLocation.start.isSame(originalEvent.start) && dropLocation.end.isSame(originalEvent.end)
},
header: {
left: 'today prev,next',
center: 'title',
right: 'timelineWeek,timelineMonth,agendaToDisplayFourWeek'
},
views: {
agendaToDisplayFourWeek: {
type: 'timeline',
slotDuration: {hours: 12},
duration: { month: 3 }
},
timelineMonth: {
eventOverlap: false,
slotDuration: {hours: 24},
slotLabelInterval: {days: 1},
type: 'timeline',
},
timelineYear: {
eventOverlap: false,
slotDuration: {hours: 1},
slotLabelInterval: {days: 1},
},
},
resources: [
{ id: 'a', title: 'Bahamas' },
{ id: 'b', title: 'Longbeach' },
{ id: 'c', title: 'Mentawai' },
{ id: 'd', title: 'Wau' },
{ id: 'e', title: 'Sin asignar' },
{ id: 'e1', title: 'Sin asignar' }
],
events: [
{ id: '1', resourceId: 'e', start: '2018-07-01', end: '2018-07-10', title: 'event 1' },
{ id: '6', resourceId: 'e', start: '2018-07-01', end: '2018-07-10', title: 'event a' },
{ id: '2', resourceId: 'e', start: '2018-07-01', end: '2018-07-10', title: 'event 2' },
{ id: '3', resourceId: 'e', start: '2018-07-01', end: '2018-07-10', title: 'event 3' },
{ id: '4', resourceId: 'e', start: '2018-07-01', end: '2018-07-10', title: 'event 4' },
{ id: '5', resourceId: 'e', start: '2018-07-01', end: '2018-07-10', title: 'event 5' }
]
});
这将产生下一个结果:
正如你所看到的,在底部有一些非预期的行为。“正如你所看到的,有一些非预期的行为”…不,这一切似乎都是正确的。你能解释一下你认为是什么问题吗?确切地说,@在“Sin asigar”下面的AdySon,这是它绘制一个长(高)空行的最后一个资源。这不是一个bug,只是因为日历在默认情况下有一定的高度,部分取决于它的宽度比。您可以使用以下设置在一定程度上对其进行控制:。日历是一个网格,资源和事件作为第二层内容覆盖在其上。因此,您看到的不是空行,而是缺少资源行。如果愿意,可以将默认高度设置得更小。当然,如果您将其设置得太小,或者资源行的高度因事件而增加,则用户将不得不滚动。谢谢@ADyson,我已经成功了。提供
高度:“auto”
似乎可以解决您的问题。