=== 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 03:55:23 +0000 +++ 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 @@ -102,7 +102,7 @@ * @param options Additional options, will be merged with the defaults */ dhis2.period.DatePicker.prototype.createRangedInstance = function( fromEl, toEl, fromIso, options ) { - var mergedOptions = $.extend({}, this.defaults, options); + var mergedOptions = $.extend({}, this.defaults, options || {}); var $fromEl = $(fromEl); var $toEl = $(toEl); @@ -150,13 +150,8 @@ * @constructor */ dhis2.period.PeriodGenerator = function( calendar, format ) { - if( typeof calendar === 'undefined' ) { - calendar = dhis2.period.calendar; - } - - if( typeof format === 'undefined' ) { - format = dhis2.period.DEFAULT_DATE_FORMAT; - } + calendar = calendar || dhis2.period.calendar; + format = format || dhis2.period.DEFAULT_DATE_FORMAT; $.extend(this, { calendar: calendar,