From ddcacb7a8313e69a4975fa1fa9451b5e3facc65e Mon Sep 17 00:00:00 2001 From: Georgii Dolzhykov Date: Sun, 21 Aug 2016 14:36:50 +0300 Subject: [PATCH] fix(datepicker): fix accidental global - Fix accidental global usage Closes #6188 --- src/datepicker/datepicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datepicker/datepicker.js b/src/datepicker/datepicker.js index 8a84cb8060..ca21a459b7 100644 --- a/src/datepicker/datepicker.js +++ b/src/datepicker/datepicker.js @@ -126,7 +126,7 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst case 'minMode': if ($scope.datepickerOptions[key]) { $scope.$watch(function() { return $scope.datepickerOptions[key]; }, function(value) { - self[key] = $scope[key] = angular.isDefined(value) ? value : datepickerOptions[key]; + self[key] = $scope[key] = angular.isDefined(value) ? value : $scope.datepickerOptions[key]; if (key === 'minMode' && self.modes.indexOf($scope.datepickerOptions.datepickerMode) < self.modes.indexOf(self[key]) || key === 'maxMode' && self.modes.indexOf($scope.datepickerOptions.datepickerMode) > self.modes.indexOf(self[key])) { $scope.datepickerMode = self[key];