我正在使用Full calendar,
码
ngOnInit() {
this.calendarOptions = {
height: '1000',
fixedWeekCount: false,
header:
{
left: 'prev,next,today',
center: 'title',
right: 'month,listYear',
},
defaultDate: '2017-01-01',
editable: true,
timeFormat: 'hh:mm A',
eventLimit: true,
//eventColor: '#ECFCD8',
events: (start, end, title, callback) => {
this.calenderservice.getExamCandidateById(this.value)
.subscribe(response => {
callback(response),
this.modalData = response.Items
this.myCalendar.fullCalendar('renderEvents', this.modalData)
console.log(this.modalData);
console.log(response);
});
}
}
这里我调用事件服务并从服务器获取包含开始,结束,标题和渲染到fullcalendar this.myCalendar.fullCalendar('renderEvents', this.modalData)
的响应,现在在渲染之前,我想通过添加字符串来更改事件标题并渲染fullcalendar
请帮帮我, 提前谢谢。