Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/string/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Events 如何在FullCalendar V4中自定义事件显示_Events_Fullcalendar_Angular7_Customization - Fatal编程技术网

Events 如何在FullCalendar V4中自定义事件显示

Events 如何在FullCalendar V4中自定义事件显示,events,fullcalendar,angular7,customization,Events,Fullcalendar,Angular7,Customization,我想自定义fullCalendar中显示的事件。目前他们只显示标题,但我想知道如何显示事件的其他字段。使用FC-v4 angular 7版本。html <full-calendar #calendar defaultView="dayGridMonth" style="background: white; padding: 5px" timeZone="UTC" (eventClick)="openTaskView($event)" (dateClick)=

我想自定义fullCalendar中显示的事件。目前他们只显示标题,但我想知道如何显示事件的其他字段。使用FC-v4 angular 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>

这种事情经常被问到。我是你的朋友。在该回调中,您可以根据事件对象数据,随心所欲地操纵事件的HTML。
calendarEventRender(info){
      if(info.event.extendedProps.batchId)
        info.el.text = " "+info.event.title+ " - "+ info.event.extendedProps.batch.name;
    }