您好我使用的是FullCalendar,我的小时标记时间有问题。示例:
[{ "start": "2017-07-27 10:00", "end": "2017-07-27 11:30" }, { "start": "2017-07-27 11:30", "end": "2017-07-27 12:00" }]
如何解决这个问题?或者告诉我在配置/ css中我需要更改什么?
{
header: {
left: '',
center: '',
right: 'prev,next'
},
lang: 'pl',
locale: 'pl',
dayNames: ['Niedziela', 'Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota'],
dayNamesShort: ['Nd', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'Sb'],
height: options.height,
defaultView: 'agendaWeek',
columnFormat: 'D.MM ddd',
minTime: options.minTime,
maxTime: options.maxTime,
displayEventTime: false,
smallTimeFormat: 'H:mm',
timezone: 'Warsaw/Poland',
buttonIcons: false,
buttonText: {
next: options.buttonText.next,
prev: options.buttonText.prev
},
allDaySlot: false,
slotMinutes: 30,
//slotDuration: '00:30:00',
//slotDuration: '00:15:00',
events: getEvents(options.events, options.optionsItem),
eventRender: function(event, element) {},
viewRender: function(view, element) {
if (view.name === 'agendaWeek') {
element.find('.fc-day-header').each(function() {
console.log($(this).text());
});
}
}
答案 0 :(得分:0)
问题是slotMinutes
变量。
您可以设置slotDuration: '00:60:00'
, slotMinutes已弃用.. 然后您可以定义插槽大小,之后您应该按css设置行高。