From 14f1e5a798d86e41fdc63b903851b81fce07efa9 Mon Sep 17 00:00:00 2001 From: Matt Lewis Date: Thu, 25 Oct 2018 13:13:30 +0800 Subject: [PATCH] fix(day-view): set allDay to false when dragging events --- .../src/modules/day/calendar-day-view.component.ts | 3 ++- .../test/calendar-day-view.component.spec.ts | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/projects/angular-calendar/src/modules/day/calendar-day-view.component.ts b/projects/angular-calendar/src/modules/day/calendar-day-view.component.ts index c2607a266..fe5786e8d 100644 --- a/projects/angular-calendar/src/modules/day/calendar-day-view.component.ts +++ b/projects/angular-calendar/src/modules/day/calendar-day-view.component.ts @@ -586,7 +586,8 @@ export class CalendarDayViewComponent implements OnChanges, OnInit, OnDestroy { newStart, newEnd, event: dayEvent.event, - type: CalendarEventTimesChangedEventType.Drag + type: CalendarEventTimesChangedEventType.Drag, + allDay: false }); } } diff --git a/projects/angular-calendar/test/calendar-day-view.component.spec.ts b/projects/angular-calendar/test/calendar-day-view.component.spec.ts index e986a4c15..6e938e15c 100644 --- a/projects/angular-calendar/test/calendar-day-view.component.spec.ts +++ b/projects/angular-calendar/test/calendar-day-view.component.spec.ts @@ -848,7 +848,8 @@ describe('CalendarDayViewComponent component', () => { newEnd: moment('2016-06-27') .add(6, 'hours') .add(30, 'minutes') - .toDate() + .toDate(), + allDay: false }); expect(eventDropped).to.have.been.calledOnce; }); @@ -1062,7 +1063,8 @@ describe('CalendarDayViewComponent component', () => { newEnd: moment('2016-06-27') .add(6, 'hours') .subtract(30, 'minutes') - .toDate() + .toDate(), + allDay: false }); }); @@ -1246,7 +1248,8 @@ describe('CalendarDayViewComponent component', () => { newEnd: moment('2016-06-27') .add(6, 'hours') .add(10, 'minutes') - .toDate() + .toDate(), + allDay: false }); });