We use DayPilot Pro Scheduler for Angular 2+. Setup:
2 scheduler items instantiated with autoScroll set to drag and the following options:
eventHeight: 60,
heightSpec : 'Max',
height: 350,
cellWidthSpec: 'Auto',
cellWidthMin: '25',
rowMinHeight: 70,
dragOutAllowed: true,
durationBarVisible: false,
allowEventOverlap: true,
floatingEvents: true,
autoScroll: 'Drag',
dynamicLoading: true,
theme: 'classicpackaging',
cssOnly: true,
eventResizeHandling: 'Disabled',
viewType: 'Days',
days: 5,
timeHeaders: [{ 'groupBy': 'Hour' }],
scale: 'CellDuration',
cellDuration: 15,
businessBeginsHour: '7',
businessEndsHour: '19',
When drag/drop from one scheduler to the other, if autoScroll is set to Drag and both scheduler instances scroll when drag/dropping the event, the following error occurs:
ERROR TypeError: Cannot read property 'calendar' of null
at daypilot-angular.min.js:18361
at HTMLDocument.n.gMouseUp (daypilot-angular.min.js:18364)
at ZoneDelegate.invokeTask (zone.js:425)
at Object.onInvokeTask (core.es5.js:3881)
at ZoneDelegate.invokeTask (zone.js:424)
at Zone.runTask (zone.js:192)
at ZoneTask.invokeTask [as invoke] (zone.js:499)
at invokeTask (zone.js:1540)
at HTMLDocument.globalZoneAwareCallback (zone.js:1577)
daypilot-angular.min.js is unminified here, so the crashing code segment is quoted below:
if (DayPilot.Util.removeClass(n.moving, o.q(o._k.eventMovingSource)), function() {
if (n.drag && n.drag.schedulerSourceEvent) {
var e = n.drag.schedulerSourceEvent,
t = e.event.calendar;
DayPilot.Util.removeClass(e, t.q(o._k.eventMovingSource))
}
}(), !n.movingShadow.row) return void t();
that is, the crashing row is: t = e.event.calendar;
e.event is null.