我正在使用 fullcalendar,我想将事件添加到特定的日期和时间,但该事件会在所有日子里呈现。(时隙有效)
我浏览了所有文档,但找不到任何错误。
我的代码:
var calendar = new FullCalendar.Calendar(calendarEl, {
events: [{ // My event
title: 'The Title',
start: '2020-08-05',
end: '2020-08-06',
startTime: '09:00:00',
endTime: '10:00:00',
allDay: false
}],
contentHeight: 'auto',
initialDate: new Date('2020-08-01'),
validRange: {
start: '2020-08-01',
end: '2020-08-18'
},
titleFormat: { year: 'numeric', month: 'long', day: 'numeric' },
headerToolbar: {
start: 'title',
center: '',
end: 'prev,next'
},
initialView: 'timeGridWeek',
slotDuration: '01:00:00',
slotMinTime: '09:00:00',
slotMaxTime: '18:00:00',
weekends: false,
locale: 'es',
allDaySlot: false,
});
这是我的代码笔错误和我正在使用的代码!
https://codepen.io/alfijuan/pen/yLeqwer?editors=1010
希望任何人都可以提供帮助!
谢谢!