HTML КОД Это мой html код для полного календаря
<div class='app'>
<div class='app-calendar' *ngIf="calendarVisible">
<full-calendar
#calendar
defaultView="dayGridMonth"
[header]="{
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
}"
[plugins]="calendarPlugins"
[weekends]="calendarWeekends"
[events]="calendarEvents"
(dateClick)="handleDateClick($event)"
></full-calendar>
</div>
</div>
Класс компонента
export class AppComponent {
@ViewChild('calendar') calendarComponent: FullCalendarComponent; // the #calendar in the
template
handleDateClick(arg) {
if (confirm('Would you like to add an event to ' + arg.dateStr + ' ?')) {
this.calendarEvents = this.calendarEvents.concat({ // add new event data. must create
new array
title: 'New Event',
start: arg.date,
allDay: arg.allDay
})
}
}
}
Я хочу перетащить событие с одной даты на другую.