Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

fix(monthView): dont fire on-date-range-sekect when dragging an event

Closes #614
  • Loading branch information...
Matt Lewis
Matt Lewis committed Jun 26, 2017
1 parent fedd346 commit 628321cec456e92c88dd8d5703718405d34310c7
@@ -133,14 +133,16 @@ angular
};

vm.onDragSelectEnd = function(day) {
vm.dateRangeSelect.endDate = day.date;
if (vm.dateRangeSelect.endDate > vm.dateRangeSelect.startDate) {
vm.onDateRangeSelect({
calendarRangeStartDate: vm.dateRangeSelect.startDate.clone().startOf('day').toDate(),
calendarRangeEndDate: vm.dateRangeSelect.endDate.clone().endOf('day').toDate()
});
if (vm.dateRangeSelect) {
vm.dateRangeSelect.endDate = day.date;
if (vm.dateRangeSelect.endDate > vm.dateRangeSelect.startDate) {
vm.onDateRangeSelect({
calendarRangeStartDate: vm.dateRangeSelect.startDate.clone().startOf('day').toDate(),
calendarRangeEndDate: vm.dateRangeSelect.endDate.clone().endOf('day').toDate()
});
}
delete vm.dateRangeSelect;
}
delete vm.dateRangeSelect;
};

vm.$onInit = function() {
@@ -6,6 +6,7 @@
class="pull-left event"
ng-class="event.cssClass"
ng-style="{backgroundColor: event.color.primary}"
ng-mousedown="$event.stopPropagation()"
ng-mouseenter="vm.highlightEvent(event, true)"
ng-mouseleave="vm.highlightEvent(event, false)"
tooltip-append-to-body="true"
@@ -5,6 +5,7 @@
<li
ng-repeat="event in vm.events | orderBy:'startsAt' track by event.calendarEventId"
ng-class="event.cssClass"
ng-mousedown="$event.stopPropagation()"
mwl-draggable="event.draggable === true"
drop-data="{event: event}"
auto-scroll="vm.draggableAutoScroll">

0 comments on commit 628321c

Please sign in to comment.
You can’t perform that action at this time.