Skip to content

Commit

Permalink
fix(datepickerPopup): do not show incorrect warning
Browse files Browse the repository at this point in the history
This stops the datepicker popup from incorrectly showing a warning when not supplying any datepicker options.

Fixes: angular-ui#5743
Closes angular-ui#5747
  • Loading branch information
deeg committed Apr 5, 2016
1 parent 1c6c7b9 commit 9800208
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/datepickerPopup/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function($scope, $element, $attrs, $compile, $log, $parse, $window, $document, $

var dates = {};
angular.forEach(['minDate', 'maxDate'], function(key) {
if ($scope.datepickerOptions[key] === null) {
if (!$scope.datepickerOptions[key]) {
dates[key] = null;
} else if (angular.isDate($scope.datepickerOptions[key])) {
dates[key] = dateParser.fromTimezone(new Date($scope.datepickerOptions[key]), timezone);
Expand Down

0 comments on commit 9800208

Please sign in to comment.