Fixed month selection.
This commit is contained in:
parent
f50f553817
commit
72b69ebf71
@ -60,13 +60,13 @@ var MonthController = function($scope, $http, $rootScope) {
|
|||||||
angular.forEach($scope.months, function(month) {
|
angular.forEach($scope.months, function(month) {
|
||||||
// Reset selected month to the new instance corresponding to the old one
|
// Reset selected month to the new instance corresponding to the old one
|
||||||
if($scope.month) {
|
if($scope.month) {
|
||||||
if(month == $scope.month) {
|
if(month.year == $scope.month.year && month.month == $scope.month.month) {
|
||||||
monthToSelect = month;
|
monthToSelect = month;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if(month.year === currentYear && month.month === currentMonth) {
|
|
||||||
monthToSelect = month;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!monthToSelect && month.year == currentYear && month.month == currentMonth) {
|
||||||
|
monthToSelect = month;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user