← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14426: future dates disabled in event-capture

 

------------------------------------------------------------
revno: 14426
committer: Abyot Asalefew Gizaw abyota@xxxxxxxxx
branch nick: dhis2
timestamp: Wed 2014-03-26 11:34:25 +0100
message:
  future dates disabled in event-capture
modified:
  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/event-capture.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== 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();
     
 });