Как можно перетащить два события между датами? - PullRequest
0 голосов
/ 09 марта 2020

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
               })
             }
           }

           }

Я хочу перетащить событие с одной даты на другую.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...