vendor/assets/javascripts/pickadate/picker.date.js in pickadate-rails-1.1.3 vs vendor/assets/javascripts/pickadate/picker.date.js in pickadate-rails-1.1.4

- old
+ new

@@ -1,8 +1,8 @@ /*! - * Date picker for pickadate.js v3.1.2 + * Date picker for pickadate.js v3.1.3 * http://amsul.github.io/pickadate.js/date.htm */ /*jshint debug: true, @@ -225,11 +225,11 @@ */ DatePicker.prototype.navigate = function( type, value, options ) { if ( Picker._.isObject( value ) ) { - var targetDateObject = new Date( value.year, value.month + ( options && options.nav ? options.nav : 0 ), 1 ), + var targetDateObject = new Date( value.year, value.month + ( options && options.nav ? options.nav : 0 ), 1 ), year = targetDateObject.getFullYear(), month = targetDateObject.getMonth(), date = value.date // Make sure the date is valid and if the month we’re going to doesn’t have enough @@ -329,14 +329,14 @@ // [1] Not inverted and date disabled. // [2] Inverted and some dates enabled. // [3] Out of range. // // Cases to **not** validate for: - // • Navigating months. + // • Navigating months. // • Not inverted and date enabled. // • Inverted and all dates disabled. - // • ..and anything else. + // • ..and anything else. if ( !options.nav ) if ( /* 1 */ ( !isInverted && calendar.disabled( dateObject ) ) || /* 2 */ ( isInverted && calendar.disabled( dateObject ) && ( hasEnabledWeekdays || hasEnabledBeforeTarget || hasEnabledAfterTarget ) ) || /* 3 */ ( dateObject.pick <= minLimitObject.pick || dateObject.pick >= maxLimitObject.pick ) ) { @@ -425,11 +425,11 @@ DatePicker.prototype.parse = function( type, value, options ) { var calendar = this, parsingObject = {} - if ( !value || Picker._.isInteger( value ) || Array.isArray( value ) || Picker._.isDate( value ) || Picker._.isObject( value ) && Picker._.isInteger( value.pick ) ) { + if ( !value || Picker._.isInteger( value ) || Array.isArray( value ) || Picker._.isDate( value ) || Picker._.isObject( value ) && Picker._.isInteger( value.pick ) ) { return value } // We need a `.format` to parse the value. if ( !( options && options.format ) ) { @@ -771,10 +771,10 @@ lowestYear -= availableYears > neededYears ? neededYears : availableYears highestYear = maxYear } - return Picker._.node( 'select', Picker._.group({ + return Picker._.node( 'select', Picker._.group({ min: lowestYear, max: highestYear, i: 1, node: 'option', item: function( loopedYear ) {