Skip to content
This repository has been archived by the owner on Jun 19, 2018. It is now read-only.

Commit

Permalink
fix(SlideBox): Fix the slide box sometimes opening the wrong cell.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Lewis committed Nov 23, 2015
1 parent 0b91ed7 commit aa7bcba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/directives/mwlCalendarMonth.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ angular
}

//Auto open the calendar to the current day if set
vm.openDayIndex = null;
if (vm.cellIsOpen) {
if (vm.cellIsOpen && !vm.openRowIndex) {
vm.openDayIndex = null;
vm.view.forEach(function(day) {
if (day.inMonth && moment(vm.currentDay).startOf('day').isSame(day.date)) {
vm.dayClicked(day, true);
Expand Down
4 changes: 2 additions & 2 deletions src/directives/mwlCalendarYear.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ angular
vm.view = calendarHelper.getYearView(vm.events, vm.currentDay, vm.cellModifier);

//Auto open the calendar to the current day if set
vm.openMonthIndex = null;
if (vm.cellIsOpen) {
if (vm.cellIsOpen && !vm.openMonthIndex) {
vm.openMonthIndex = null;
vm.view.forEach(function(month) {
if (moment(vm.currentDay).startOf('month').isSame(month.date)) {
vm.monthClicked(month, true);
Expand Down

0 comments on commit aa7bcba

Please sign in to comment.