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

fix(draggableEvents): copy the year when dropping an event on a month…

… or year cell

Closes #326
  • Loading branch information...
Matt Lewis
Matt Lewis committed May 11, 2016
1 parent bc07bd6 commit 8467347858da2fed8da5f4325297e7daa39589ba
Showing with 5 additions and 2 deletions.
  1. +2 −1 src/directives/mwlCalendarMonth.js
  2. +3 −1 src/directives/mwlCalendarYear.js
@@ -77,7 +77,8 @@ angular

var newStart = moment(event.startsAt)
.date(moment(newDayDate).date())
.month(moment(newDayDate).month());
.month(moment(newDayDate).month())
.year(moment(newDayDate).year());

var newEnd = calendarHelper.adjustEndDateFromStartDiff(event.startsAt, newStart, event.endsAt);

@@ -51,7 +51,9 @@ angular
};

vm.handleEventDrop = function(event, newMonthDate) {
var newStart = moment(event.startsAt).month(moment(newMonthDate).month());
var newStart = moment(event.startsAt)
.month(moment(newMonthDate).month())
.year(moment(newMonthDate).year());
var newEnd = calendarHelper.adjustEndDateFromStartDiff(event.startsAt, newStart, event.endsAt);

vm.onEventTimesChanged({

0 comments on commit 8467347

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