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

Commit aa7bcba

Browse files
author
Matt Lewis
committed
fix(SlideBox): Fix the slide box sometimes opening the wrong cell.
1 parent 0b91ed7 commit aa7bcba

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/directives/mwlCalendarMonth.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ angular
2121
}
2222

2323
//Auto open the calendar to the current day if set
24-
vm.openDayIndex = null;
25-
if (vm.cellIsOpen) {
24+
if (vm.cellIsOpen && !vm.openRowIndex) {
25+
vm.openDayIndex = null;
2626
vm.view.forEach(function(day) {
2727
if (day.inMonth && moment(vm.currentDay).startOf('day').isSame(day.date)) {
2828
vm.dayClicked(day, true);

src/directives/mwlCalendarYear.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ angular
1212
vm.view = calendarHelper.getYearView(vm.events, vm.currentDay, vm.cellModifier);
1313

1414
//Auto open the calendar to the current day if set
15-
vm.openMonthIndex = null;
16-
if (vm.cellIsOpen) {
15+
if (vm.cellIsOpen && !vm.openMonthIndex) {
16+
vm.openMonthIndex = null;
1717
vm.view.forEach(function(month) {
1818
if (moment(vm.currentDay).startOf('month').isSame(month.date)) {
1919
vm.monthClicked(month, true);

0 commit comments

Comments
 (0)