Skip to content

Commit

Permalink
Working on #7: added a test configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Barbara Post committed Jun 1, 2017
1 parent c1e5c35 commit 1785126
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ <h1 class="title">Test of ionic date picker</h1>
<div class="row">
<input type="radio" name="disableDates" value="year" ng-model="options.disableDates">Enable from 01-01-2012 to 12-31-2018
</div>
<div class="row">
<input type="radio" name="disableDates" value="month" ng-model="options.disableDates">Enable from 03-01-2017 to 08-31-2017
</div>
<div class="row">
<input type="radio" name="disableDates" value="special" ng-model="options.disableDates">Enable from 03-12-2017 to 10-18-2017
</div>
Expand Down
4 changes: 4 additions & 0 deletions test/www/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ angular.module('starter.controllers', [])
} else if($scope.options.disableDates == "year") {
ipObj1.from = new Date(2012, 0, 1);
ipObj1.to = new Date(2018, 11, 31);
} else if($scope.options.disableDates == "month") {
// from 03-01-2017 to 08-31-2017
ipObj1.from = new Date(2017, 2, 1);
ipObj1.to = new Date(2017, 7, 31);
} else {
// from 03-12-2017 to 10-18-2017
ipObj1.from = new Date(2017, 2, 12);
Expand Down
3 changes: 3 additions & 0 deletions test_original_datepicker/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ <h1 class="title">Test of original project's ionic date picker</h1>
<div class="row">
<input type="radio" name="disableDates" value="year" ng-model="options.disableDates">Enable from 01-01-2012 to 12-31-2018
</div>
<div class="row">
<input type="radio" name="disableDates" value="month" ng-model="options.disableDates">Enable from 03-01-2017 to 08-31-2017
</div>
<div class="row">
<input type="radio" name="disableDates" value="special" ng-model="options.disableDates">Enable from 03-12-2017 to 10-18-2017
</div>
Expand Down
4 changes: 4 additions & 0 deletions test_original_datepicker/www/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ angular.module('starter.controllers', [])
} else if($scope.options.disableDates == "year") {
ipObj1.from = new Date(2012, 0, 1);
ipObj1.to = new Date(2018, 11, 31);
} else if($scope.options.disableDates == "month") {
// from 03-01-2017 to 08-31-2017
ipObj1.from = new Date(2017, 2, 1);
ipObj1.to = new Date(2017, 7, 31);
} else {
// from 03-12-2017 to 10-18-2017
ipObj1.from = new Date(2017, 2, 12);
Expand Down

0 comments on commit 1785126

Please sign in to comment.