diff options
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/EventDateTimeFilterCtrl.js | 8 | ||||
| -rw-r--r-- | www/templates/events-date-time-filter.html | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/www/js/EventDateTimeFilterCtrl.js b/www/js/EventDateTimeFilterCtrl.js index ee614e52..3c9bcb8a 100644 --- a/www/js/EventDateTimeFilterCtrl.js +++ b/www/js/EventDateTimeFilterCtrl.js @@ -25,6 +25,10 @@ angular.module('zmApp.controllers') } }; + $scope.$on('$ionicView.beforeEnter', function () { + $scope.today = moment().format("YYYY-MM-DD"); + }); + //-------------------------------------------------------------------------- // Clears filters //-------------------------------------------------------------------------- @@ -89,6 +93,10 @@ angular.module('zmApp.controllers') $rootScope.toString = moment($rootScope.toDate).format("YYYY-MM-DD") + " " + moment($rootScope.toTime).format("HH:mm:ss"); + + + + //console.log("CONCAT DATES " + temp); // // var startDate = moment(temp).format("YYYY-MM-DD hh:mm:ss"); diff --git a/www/templates/events-date-time-filter.html b/www/templates/events-date-time-filter.html index 465f79e5..84e39ea2 100644 --- a/www/templates/events-date-time-filter.html +++ b/www/templates/events-date-time-filter.html @@ -5,7 +5,7 @@ <ion-content> <label class="item item-input"> <span class="input-label">{{'kFromDate'|translate}}:</span> - <input type="date" ng-model="$root.fromDate"> + <input type="date" ng-model="$root.fromDate" max={{today}}> </label> <label class="item item-input"> <span class="input-label">{{'kFromTime'|translate}}</span> @@ -13,7 +13,7 @@ </label> <label class="item item-input"> <span class="input-label">{{'kToDate'|translate}}</span> - <input type="date" ng-model="$root.toDate"> + <input type="date" ng-model="$root.toDate" max={{today}}> </label> <label class="item item-input"> <span class="input-label">{{'kToTime'|translate}}</span> |
