Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
Fix bug when setting the minimum date but not defining the model
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmdev committed Jun 15, 2017
1 parent e8bce6b commit 770eeef
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngComboDatePicker",
"version": "1.5.0",
"version": "1.5.1",
"authors": [
"jfmdev <jfmdev@outlook.com>"
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-combo-date-picker",
"version": "1.5.0",
"version": "1.5.1",
"description": "An Angular directive to select dates using combo boxes",
"main": "source/ngComboDatePicker.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions source/ngComboDatePicker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* ngComboDatePicker v1.5.0
* ngComboDatePicker v1.5.1
* http://github.com/jfmdev/ngComboDatePicker
* «Copyright 2015 Jose F. Maldonado»
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Expand Down Expand Up @@ -145,8 +145,8 @@ angular.module("ngComboDatePicker", [])
}

// Verify if selected date is in the valid range.
if($scope.ngMinModel &&$scope.ngModel < $scope.ngMinModel) $scope.ngModel = $scope.ngMinModel;
if($scope.ngMaxModel && $scope.ngModel > $scope.ngMaxModel) $scope.ngModel = $scope.ngMaxModel;
if($scope.ngModel && $scope.ngMinModel && $scope.ngModel < $scope.ngMinModel) $scope.ngModel = $scope.ngMinModel;
if($scope.ngModel && $scope.ngMaxModel && $scope.ngModel > $scope.ngMaxModel) $scope.ngModel = $scope.ngMaxModel;
});

// Initialize place holders.
Expand Down
4 changes: 2 additions & 2 deletions source/ngComboDatePicker.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 770eeef

Please sign in to comment.