=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.period.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.period.js 2014-05-06 04:09:19 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.period.js 2014-05-06 04:11:23 +0000 @@ -153,6 +153,10 @@ calendar = calendar || dhis2.period.calendar; format = format || dhis2.period.DEFAULT_DATE_FORMAT; + if( typeof calendar === 'undefined' ) { + throw new Error('calendar parameter was not provided or is undefined, and no global dhis2.period.calendar instance exists.') + } + $.extend(this, { calendar: calendar, format: format,