Skip to content

Commit 14f1e5a

Browse files
committed
fix(day-view): set allDay to false when dragging events
1 parent 6f45124 commit 14f1e5a

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

projects/angular-calendar/src/modules/day/calendar-day-view.component.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,8 @@ export class CalendarDayViewComponent implements OnChanges, OnInit, OnDestroy {
586586
newStart,
587587
newEnd,
588588
event: dayEvent.event,
589-
type: CalendarEventTimesChangedEventType.Drag
589+
type: CalendarEventTimesChangedEventType.Drag,
590+
allDay: false
590591
});
591592
}
592593
}

projects/angular-calendar/test/calendar-day-view.component.spec.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,8 @@ describe('CalendarDayViewComponent component', () => {
848848
newEnd: moment('2016-06-27')
849849
.add(6, 'hours')
850850
.add(30, 'minutes')
851-
.toDate()
851+
.toDate(),
852+
allDay: false
852853
});
853854
expect(eventDropped).to.have.been.calledOnce;
854855
});
@@ -1062,7 +1063,8 @@ describe('CalendarDayViewComponent component', () => {
10621063
newEnd: moment('2016-06-27')
10631064
.add(6, 'hours')
10641065
.subtract(30, 'minutes')
1065-
.toDate()
1066+
.toDate(),
1067+
allDay: false
10661068
});
10671069
});
10681070

@@ -1246,7 +1248,8 @@ describe('CalendarDayViewComponent component', () => {
12461248
newEnd: moment('2016-06-27')
12471249
.add(6, 'hours')
12481250
.add(10, 'minutes')
1249-
.toDate()
1251+
.toDate(),
1252+
allDay: false
12501253
});
12511254
});
12521255

0 commit comments

Comments
 (0)