全日历标题工具栏按钮显示为两个按钮

Nes*_*ess 1 fullcalendar ionic5 fullcalendar-5 angular10

我正在 ionic 5 应用程序中测试 fullcalendar/angular 5,视图的标题工具栏显示为两个按钮:

\n

在此输入图像描述

\n

这是我的日历选项:

\n
  calendarOptions: CalendarOptions = {\n    contentHeight: "auto",\n    headerToolbar: {\n      left: \'title\',\n      center: \'timeGridMes, timeGridDia\',\n      right: \'prev,next today\'\n    },\n    initialView: \'timeGridDia\',\n    weekends: true,\n    editable: false,\n    selectable: true,\n    selectMirror: true,\n    dayMaxEvents: true,\n    allDaySlot:false,      \n    initialDate: new Date(),\n    firstDay: 1,\n    fixedWeekCount: false,\n    locale: \'es\',\n    slotMinTime : "08:00:00",\n    slotMaxTime : "23:00:00",\n    navLinks: true,\n    nowIndicator: true,\n    slotDuration: "00:15:00",\n    slotLabelInterval: "00:15:00",\n    eventTimeFormat: { hour12: false, hour: \'2-digit\', minute: \'2-digit\' },\n    showNonCurrentDates: true,\n    timeZone: \'local\',\n    weekNumbers: true,\n    weekText: "S",\n    buttonText: {\n      today: \'Hoy\'\n    },\n    views: {\n      timeGridMes: {\n        type: \'dayGridMonth\',\n        dayMaxEventRows: 4,\n        buttonText: \'Mes\',\n        titleFormat: { year: \'numeric\', month: \'short\'}\n      },\n      timeGridDia: {\n        type: \'timeGridDay\',\n        buttonText: \'D\xc3\xada\',\n        titleFormat: { month: \'short\', day: \'numeric\' }\n      }\n    },\n    select: this.handleDateSelect.bind(this),\n    eventClick: this.handleEventClick.bind(this),\n    eventsSet: this.handleEvents.bind(this)\n\n  };\n
Run Code Online (Sandbox Code Playgroud)\n

这是它生成的 html:

\n
<div class="fc-toolbar-chunk">\n    <div class="fc-button-group">\n        <button class="fc-timeGridMes-button fc-button fc-button-primary" type="button">Mes</button>\n        <button class="fc--button fc-button fc-button-primary" type="button"></button>\n    </div>\n    <button class="fc-timeGridDia-button fc-button fc-button-primary fc-button-active" type="button">D\xc3\xada</button>\n</div>\n
Run Code Online (Sandbox Code Playgroud)\n

为什么生成带有两个按钮的 class = "fc-button-group" 的 div ?

\n

Nes*_*ess 6

删除字符串中的逗号可以解决问题...:

headerToolbar: {
  left: 'title',
  center: 'timeGridMes timeGridDia',
  right: 'prev next today'
},
Run Code Online (Sandbox Code Playgroud)

https://github.com/fullcalendar/fullcalendar/issues/5821#issue-701022933