我想自定义事件在fullCalendar中显示的内容。目前他们只显示标题,但我想知道如何显示事件的其他字段。使用FC-v4角度7版本。
html
<full-calendar #calendar defaultView="dayGridMonth" style="background: white; padding: 5px" timeZone="UTC"
(eventClick)="openTaskView($event)" (dateClick)="openDateView($event)" aspectRatio="1.8"
[customButtons]="options.customButtons" [header]="{
center: 'title',
left: 'filter,dayGridMonth,timeGridWeek,timeGridDay',
right: 'prev, next today'
}" [plugins]="calendarPlugins" [events]="selectedEvents" (eventRender)="calendarEventRender($event)" [selectable]="true"
schedulerLicenseKey="GPL-My-Project-Is-Open-Source">
</full-calendar>
比较
calendarEventRender(info){
if(info.event.extendedProps.batchId)
info.el.text = " "+info.event.title+ " - "+ info.event.extendedProps.batch.name;
}