gpt4 book ai didi

html - dateClick 未以全日历 Angular 发出

转载 作者:太空宇宙 更新时间:2023-11-04 14:25:37 25 4
gpt4 key购买 nike

dateClick 事件不起作用,我完全按照文档中的说明进行操作:

https://fullcalendar.io/docs/angular

HTML:

    <full-calendar #calendar (dateClick)="alert('clicked')" defaultView="timeGridWeek"
[nowIndicator]="true" [header]="header" [plugins]="calendarPlugins" [events]="[
{ title: 'event 1', start: '2019-05-22T13:00:00', textColor: 'white', end: '2019-05-22T14:00:00' },
{ title: 'event 2', start: '2019-05-23T14:00:00', end: '2019-05-23T15:00:00' }
]"></full-calendar>

:

import dayGridPlugin from '@fullcalendar/daygrid';
import timeGridPlugin from '@fullcalendar/timegrid';
import listPlugin from '@fullcalendar/list';

public calendarPlugins = [dayGridPlugin, timeGridPlugin, listPlugin];

最佳答案

为了解决这个问题,我做了以下步骤:

npm install --save @fullcalendar/interaction

我将插件的导入添加到组件中:

import dayGridPlugin from '@fullcalendar/daygrid';
import timeGridPlugin from '@fullcalendar/timegrid';
import listPlugin from '@fullcalendar/list';
import interactionPlugin from '@fullcalendar/interaction';

public calendarPlugins = [dayGridPlugin,
timeGridPlugin, listPlugin , interactionPlugin];

关于html - dateClick 未以全日历 Angular 发出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56261140/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com