=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2010-10-14 08:14:12 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2010-10-15 13:15:20 +0000 @@ -807,7 +807,7 @@ * Create jQuery datepicker for input text with id * * * @param id the id of input filed which you want enter date * */ -function datePickerValid( id ) +function datePickerValid( id, today ) { jQuery("#" + id).datepicker( { @@ -822,9 +822,10 @@ maxDate: '+0d +0w', constrainInput: true }); - - s = jQuery("#" + id ); - if( s.val()=='' ) s.val( getCurrentDate() ); + if( today ){ + s = jQuery("#" + id ); + if( s.val()=='' ) s.val( getCurrentDate() ); + } } === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm 2010-10-04 10:59:24 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm 2010-10-15 13:15:20 +0000 @@ -5,7 +5,7 @@ checkValueIsExist( "name", "validateOrganisationUnit.action"); checkValueIsExist( "code", "validateOrganisationUnit.action"); - datePicker( 'openingDate' ); + datePickerValid( 'openingDate', false ); }); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm 2010-10-04 10:59:24 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm 2010-10-15 13:15:20 +0000 @@ -10,7 +10,7 @@ id: $organisationUnit.id }); - datePickerInRange( 'openingDate', 'closedDate', true, false ); + datePickerInRange( 'openingDate', 'closedDate', false, false ); @@ -50,7 +50,7 @@ - +