我正在使用 FullCalendar v6。我需要在一个标题行和另一个标题行月份名称中显示年份。目前,它显示单个标题行来显示月份名称。下面是我的代码:
<FullCalendar
plugins={plugins}
eventMinWidth={5}
initialView='sixMonthView'
daym
views={
{
sixMonthView: {
eventOverlap: false,
type: 'resourceTimelineMonth',
duration: { months: 12},
slotLabelInterval: {months: 1},
slotDuration: { days: 1 },
dateIncrement: { months: 6 },
slotLabelClassNames: 'slot-label',
slotMinWidth: 120,
},
}
}
editable={true}
selectable={true}
selectMirror={true}
dayMaxEvents={true}
weekends={this.state.weekendsVisible}
resources={[
{ id: 'a', title: 'Auditorium A' },
{ id: 'b', title: 'Auditorium B', eventColor: 'green' },
{ id: 'c', title: 'Auditorium C', eventColor: 'orange' },
]}
// firstDay={6}
initialDate={'2023-07-01'}
initialEvents={[
{ title: 'nice', start: '2024-03-01', end: '2024-03-10', resourceId: 'a', allDay: true },
{ title: 'nice 2', start: '2024-03-01', end: '2024-03-10', resourceId: 'a', allDay: true }
]}
/>
下面是我期待的截图
但我得到以下输出: