src/js/ui/date/ui.date.js
function setValue(d1, d2) {
            if (compareDates(d1, d2) === 1) {
                throw new RangeError();
            }

            if (compareDates(d1, this.minDateField.date) !== 0 ||
                compareDates(d2, this.maxDateField.date) !== 0   )
            {
                var prev = this.getValue();
                this.minDateField.setValue(d1);
                this.maxDateField.setValue(d2);

                this.getCalendar().monthDays.retagModel();

                this.fire("dateRangeSelected", [this, prev]);
                if (this.dateRangeSelected !== undefined) {
                    this.dateRangeSelected(prev);
                }
            }
        }
function setValue(d1, d2) {
            if (compareDates(d1, d2) === 1) {
                throw new RangeError();
            }

            if (compareDates(d1, this.minDateField.date) !== 0 ||
                compareDates(d2, this.maxDateField.date) !== 0   )
            {
                var prev = this.getValue();
                this.minDateField.setValue(d1);
                this.maxDateField.setValue(d2);

                this.getCalendar().monthDays.retagModel();

                this.fire("dateRangeSelected", [this, prev]);
                if (this.dateRangeSelected !== undefined) {
                    this.dateRangeSelected(prev);
                }
            }
        }
function setValue ( d1 , d2 ) { if ( compareDates ( d1 , d2 ) === 1 ) { throw new RangeError ( ) ; } if ( compareDates ( d1 , this . minDateField . date ) !== 0 || compareDates ( d2 , this . maxDateField . date ) !== 0 ) { var prev = this . getValue ( ) ; this . minDateField . setValue ( d1 ) ; this . maxDateField . setValue ( d2 ) ; this . getCalendar ( ) . monthDays . retagModel ( ) ; this . fire ( "dateRangeSelected" , [ this , prev ] ) ; if ( this . dateRangeSelected !== undefined ) { this . dateRangeSelected ( prev ) ; } } }
Set the given date range.
@param {Date} d1 a minimal possible date
@param {Date} d2 a maximal possible date
@method setValue
Set the given date range .