dist/js/datepicker.js
function (param, value) {
            var len = arguments.length,
                lastSelectedDate = this.lastSelectedDate;

            if (len == 2) {
                this.opts[param] = value;
            } else if (len == 1 && typeof param == 'object') {
                this.opts = $.extend(true, this.opts, param)
            }

            this._createShortCuts();
            this._syncWithMinMaxDates();
            this._defineLocale(this.opts.language);
            this.nav._addButtonsIfNeed();
            if (!this.opts.onlyTimepicker) this.nav._render();
            this.views[this.currentView]._render();

            if (this.elIsInput && !this.opts.inline) {
                this._setPositionClasses(this.opts.position);
                if (this.visible) {
                    this.setPosition(this.opts.position)
                }
            }

            if (this.opts.classes) {
                this.$datepicker.addClass(this.opts.classes)
            }

            if (this.opts.onlyTimepicker) {
                this.$datepicker.addClass('-only-timepicker-');
            }

            if (this.opts.timepicker) {
                if (lastSelectedDate) this.timepicker._handleDate(lastSelectedDate);
                this.timepicker._updateRanges();
                this.timepicker._updateCurrentTime();
                // Change hours and minutes if it's values have been changed through min/max hours/minutes
                if (lastSelectedDate) {
                    lastSelectedDate.setHours(this.timepicker.hours);
                    lastSelectedDate.setMinutes(this.timepicker.minutes);
                }
            }

            this._setInputValue();

            return this;
        }
function (param, value) {
            var len = arguments.length,
                lastSelectedDate = this.lastSelectedDate;

            if (len == 2) {
                this.opts[param] = value;
            } else if (len == 1 && typeof param == 'object') {
                this.opts = $.extend(true, this.opts, param)
            }

            this._createShortCuts();
            this._syncWithMinMaxDates();
            this._defineLocale(this.opts.language);
            this.nav._addButtonsIfNeed();
            if (!this.opts.onlyTimepicker) this.nav._render();
            this.views[this.currentView]._render();

            if (this.elIsInput && !this.opts.inline) {
                this._setPositionClasses(this.opts.position);
                if (this.visible) {
                    this.setPosition(this.opts.position)
                }
            }

            if (this.opts.classes) {
                this.$datepicker.addClass(this.opts.classes)
            }

            if (this.opts.onlyTimepicker) {
                this.$datepicker.addClass('-only-timepicker-');
            }

            if (this.opts.timepicker) {
                if (lastSelectedDate) this.timepicker._handleDate(lastSelectedDate);
                this.timepicker._updateRanges();
                this.timepicker._updateCurrentTime();
                // Change hours and minutes if it's values have been changed through min/max hours/minutes
                if (lastSelectedDate) {
                    lastSelectedDate.setHours(this.timepicker.hours);
                    lastSelectedDate.setMinutes(this.timepicker.minutes);
                }
            }

            this._setInputValue();

            return this;
        }
function ( param , value ) { var len = arguments . length , lastSelectedDate = this . lastSelectedDate ; if ( len == 2 ) { this . opts [ param ] = value ; } else if ( len == 1 && typeof param == 'object' ) { this . opts = $ . extend ( true , this . opts , param ) } this . _createShortCuts ( ) ; this . _syncWithMinMaxDates ( ) ; this . _defineLocale ( this . opts . language ) ; this . nav . _addButtonsIfNeed ( ) ; if ( ! this . opts . onlyTimepicker ) this . nav . _render ( ) ; this . views [ this . currentView ] . _render ( ) ; if ( this . elIsInput && ! this . opts . inline ) { this . _setPositionClasses ( this . opts . position ) ; if ( this . visible ) { this . setPosition ( this . opts . position ) } } if ( this . opts . classes ) { this . $datepicker . addClass ( this . opts . classes ) } if ( this . opts . onlyTimepicker ) { this . $datepicker . addClass ( '-only-timepicker-' ) ; } if ( this . opts . timepicker ) { if ( lastSelectedDate ) this . timepicker . _handleDate ( lastSelectedDate ) ; this . timepicker . _updateRanges ( ) ; this . timepicker . _updateCurrentTime ( ) ; // Change hours and minutes if it's values have been changed through min/max hours/minutes if ( lastSelectedDate ) { lastSelectedDate . setHours ( this . timepicker . hours ) ; lastSelectedDate . setMinutes ( this . timepicker . minutes ) ; } } this . _setInputValue ( ) ; return this ; }
Updates datepicker options
@param {String|Object} param - parameter's name to update. If object then it will extend current options
@param {String|Number|Object} [value] - new param value
Updates datepicker options