Fullcalendar eventDragStop返回上一个日期

时间:2019-11-08 15:42:29

标签: fullcalendar angular8

我正在使用Angular完整日历,并尝试在用户将事件拖到其他时间时更新预订。但是,当我记录该事件时,它将返回我以前的开始和结束时间。如何获取当前的开始时间和结束时间?

    <full-calendar
        defaultView="dayGridMonth"
        [editable]="true"
        [eventLimit]="5"
        [slotDuration]="'00:15:00'"
        [snapDuration]="'00:15:00'"
        [nowIndicator]="true"
        [slotLabelFormat]="timeFormat"
        [eventTimeFormat]="timeFormat"
        [minTime]="'08:00:00'"
        [maxTime]="'24:00:00'"
        [header]="{
            left: 'prev,next today',
            center: 'title',
            right: 'dayGridMonth, timeGridWeek, timeGridDay, listWeek'
        }"
        [plugins]="calendarPlugins"
        [events]="calendarEvents"
        (eventDragStop)="updateReservation($event)"

    ></full-calendar>

这是updateReservation方法:

updateReservation(event) {
    console.log(event, event.el.fcSeg.start, moment(event.el.fcSeg.start).format());
}

希望有人可以帮助我:)

0 个答案:

没有答案