Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 7e93ec9

Browse files
luberwesleycho
authored andcommitted
fix(datepicker): allow expressions for minMode/maxMode
- Fixes expressions not being parsed for `min-mode` and `max-mode` Closes #5264 Closes #5268 Fixes #5240
1 parent bcaa221 commit 7e93ec9

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

Diff for: src/datepicker/datepicker.js

+1-10
Original file line numberDiff line numberDiff line change
@@ -656,16 +656,7 @@ function(scope, element, attrs, $compile, $parse, $document, $rootScope, $positi
656656
});
657657
}
658658

659-
angular.forEach(['minMode', 'maxMode'], function(key) {
660-
if (attrs[key]) {
661-
scope.$parent.$watch(function() { return attrs[key]; }, function(value) {
662-
scope.watchData[key] = value;
663-
});
664-
datepickerEl.attr(cameltoDash(key), 'watchData.' + key);
665-
}
666-
});
667-
668-
angular.forEach(['datepickerMode', 'shortcutPropagation'], function(key) {
659+
angular.forEach(['minMode', 'maxMode', 'datepickerMode', 'shortcutPropagation'], function(key) {
669660
if (attrs[key]) {
670661
var getAttribute = $parse(attrs[key]);
671662
var propConfig = {

0 commit comments

Comments
 (0)