=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/directives.js' --- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/directives.js 2014-03-19 08:22:59 +0000 +++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/directives.js 2014-03-26 10:34:25 +0000 @@ -138,16 +138,15 @@ element.datepicker({ changeYear: true, changeMonth: true, + maxDate: new Date(), dateFormat: 'yy-mm-dd', onSelect: function(date) { - //scope.date = date; ctrl.$setViewValue(date); $(this).change(); scope.$apply(); } }) .change(function() { - //var rawDate = $filter('date')(this.value, 'yyyy-MM-dd'); var rawDate = this.value; var convertedDate = moment(this.value, 'YYYY-MM-DD')._d; convertedDate = $filter('date')(convertedDate, 'yyyy-MM-dd'); @@ -189,7 +188,6 @@ link: function (scope, element, attr, ctrls) { element.bind('focus', function () { ctrls[0].getMatchesAsync(ctrls[1].$viewValue); - //scope.$apply(); }); } }; === modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js' --- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js 2014-03-26 09:44:22 +0000 +++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js 2014-03-26 10:34:25 +0000 @@ -123,7 +123,7 @@ } }); - //dhis2.availability.startAvailabilityCheck(); + dhis2.availability.startAvailabilityCheck(); });