获取此错误。 我想根据从事件方法获得的日期来加载事件。 这是我的代码。加载时未加载,但如果我更改月份并返回到当前月份,则会加载
this.calendarOptions = {
editable: true,
eventLimit: true,
// defaultView: 'agendaWeek',
displayEventTime: false,
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
events: (start, end, timezone, callback) => setTimeout(() => { this.eventsGet(start, end, timezone, callback) }, 1000),
eventMouseover: (event, jsEvent, view) => this.eventMouseOver(event, jsEvent, view),
};
eventsGet(start, end, timezone, callback) {
var data = {
"start": this.ConvertDatetoString(start._d),
"end": this.ConvertDatetoString(end._d),
}
var eventstest = [];
this.schedulerService.getEvents(data).then(data => {
this.events = [];
if(data)
{
eventstest = data;
callback(eventstest)
}
});
}
<ng-fullcalendar #ucCalendar [(eventsModel)]="events" [options]="calendarOptions"
(eventDrop)="updateEvent($event.detail)" (dayClick)="dayClick($event.detail, Appointment)" (longPressDelay)="longPressDelay($event.detail)"
(eventResize)="updateEvent($event.detail)" (clickButton)="clickButton($event.detail)"></ng-fullcalendar>