【发布时间】:2016-12-13 04:33:34
【问题描述】:
我正在使用 fullcalendar v2.9.1,我想显示 slotDuration 为 '00:90:00' 和 maxTime: "22:00:00", minTime: "08:00:00" 的日历。
但是日历没有在左栏中显示小时数。
当我删除最小/最大时间时,我注意到没有上午 8 点,只有 6:30 和 9:00(因为 slotDuration 为 90 分钟)。
设置如下:
views: {
agendaOneDay: {
type: 'agenda',
duration: { days: 1 },
// buttonText: '2 day',
weekends: false,
columnFormat: 'ddd M/D'
}
},
timezone: "local",
header: false,
height: calendarService.getCalendarHeightViaScreenSize(contact),
slotDuration: '00:90:00',
slotEventOverlap: false,
// slotLabelInterval: '02:00:00',
defaultView: device_type_mobile ? 'agendaOneDay' : 'agendaWeek',
eventBackgroundColor: 'white',
eventTextColor: '#3f51b5',
firstDay: 1,
weekends: false,
selectable: true,
eventOverlap: false,
selectOverlap: contact ? true : false,
editable: contact ? false : true,
maxTime: "22:30:00",
minTime: "08:00:00",
axisFormat: 'HH:mm',
allDaySlot: false
有人可以在这方面帮助我吗?
更新: 我尝试使用 moment.js:
slotDuration: moment.duration('00:90:00'),
即使这样,它也不起作用。
谢谢!
【问题讨论】:
标签: javascript calendar fullcalendar momentjs