changeEndDate () {
        let _self = this,
            datesToAdd = _self.clndr.options.extras.datesToAdd,
            datesToDel = _self.clndr.options.extras.datesToDel,
            newEndDate = _self.$endDateField.val().length ? _self.$endDateField.val() : moment(new Date(), _self.dateFormatInternal).add(15, 'years').format(_self.localeFormat),
            newEndDateMoment = newEndDate.length ? moment(newEndDate, _self.localeFormat) : moment(new Date(), _self.dateFormatInternal).add(15, 'years');

        // Update the endDate constraint before re-rendering
        _self.clndr.options.constraints.endDate = moment(newEndDate, _self.localeFormat).format(_self.dateFormatInternal);

        // Remove now out-of-bounds dates from the datesToAdd array
        const outOfBoundsDatesToAdd = _self.clndr.options.extras.datesToAdd
            .filter(EventCalendar.isInYear.bind(this, newEndDateMoment))
            .filter(EventCalendar.isInMonth.bind(this, newEndDateMoment))
            .filter(EventCalendar.isAfterDate.bind(this, newEndDateMoment));

        $.each(outOfBoundsDatesToAdd, function(k, v) {
            datesToAdd = datesToAdd.filter(EventCalendar.doesNotMatchDate.bind(this, v));
        });

        // Update stored datesToAdd with outOfBounds date removed
        _self.clndr.options.extras.datesToAdd = datesToAdd;

        // Remove now out-of-bounds dates from the datesToDel array
        const outOfBoundsDatesToDel = _self.clndr.options.extras.datesToDel
            .filter(EventCalendar.isInYear.bind(this, newEndDateMoment))
            .filter(EventCalendar.isInMonth.bind(this, newEndDateMoment))
            .filter(EventCalendar.isAfterDate.bind(this, newEndDateMoment));

        $.each(outOfBoundsDatesToDel, function(k, v) {
            datesToDel = datesToDel.filter(EventCalendar.doesNotMatchDate.bind(this, v));
        });

        // Update stored datesToDel with outOfBounds date removed
        _self.clndr.options.extras.datesToDel = datesToDel;

        // If chosen end date is before the currently focused month, then refocus the calendar
        if (newEndDateMoment.isBefore(_self.currentCalendarMonth)) {
            _self.clndr.setMonth(newEndDateMoment.month());
        }

        // Reset the startDateField `max` value to reflect the endDate value
        _self.setStartDateMaximum();

        // Update the review information to reflect changes to out-of-bound dates
        _self.updateReview();

        // Render the changes
        _self.clndr.render();
        _self.paintMonth(_self.clndr.month);
    }
/**
     * Fired when the endDateField changes and re-renders the calendar to stop at the new endDate, removes any
     * out-of-bounds dates from the datesToAdd / datesToDel arrays and repaints the month.
     */
Fired when the endDateField changes and re-renders the calendar to stop at the new endDate, removes any
out-of-bounds dates from the datesToAdd / datesToDel arrays and repaints the month.
Fired when the endDateField changes and re - renders the calendar to stop at the new endDate removes any out - of - bounds dates from the datesToAdd / datesToDel arrays and repaints the month .
changeEndDate () {
        let _self = this,
            datesToAdd = _self.clndr.options.extras.datesToAdd,
            datesToDel = _self.clndr.options.extras.datesToDel,
            newEndDate = _self.$endDateField.val().length ? _self.$endDateField.val() : moment(new Date(), _self.dateFormatInternal).add(15, 'years').format(_self.localeFormat),
            newEndDateMoment = newEndDate.length ? moment(newEndDate, _self.localeFormat) : moment(new Date(), _self.dateFormatInternal).add(15, 'years');
        _self.clndr.options.constraints.endDate = moment(newEndDate, _self.localeFormat).format(_self.dateFormatInternal);
        const outOfBoundsDatesToAdd = _self.clndr.options.extras.datesToAdd
            .filter(EventCalendar.isInYear.bind(this, newEndDateMoment))
            .filter(EventCalendar.isInMonth.bind(this, newEndDateMoment))
            .filter(EventCalendar.isAfterDate.bind(this, newEndDateMoment));
        $.each(outOfBoundsDatesToAdd, function(k, v) {
            datesToAdd = datesToAdd.filter(EventCalendar.doesNotMatchDate.bind(this, v));
        });
        _self.clndr.options.extras.datesToAdd = datesToAdd;
        const outOfBoundsDatesToDel = _self.clndr.options.extras.datesToDel
            .filter(EventCalendar.isInYear.bind(this, newEndDateMoment))
            .filter(EventCalendar.isInMonth.bind(this, newEndDateMoment))
            .filter(EventCalendar.isAfterDate.bind(this, newEndDateMoment));
        $.each(outOfBoundsDatesToDel, function(k, v) {
            datesToDel = datesToDel.filter(EventCalendar.doesNotMatchDate.bind(this, v));
        });
        _self.clndr.options.extras.datesToDel = datesToDel;
        if (newEndDateMoment.isBefore(_self.currentCalendarMonth)) {
            _self.clndr.setMonth(newEndDateMoment.month());
        }
        _self.setStartDateMaximum();
        _self.updateReview();
        _self.clndr.render();
        _self.paintMonth(_self.clndr.month);
    }
changeEndDate ( ) { let _self = this , datesToAdd = _self . clndr . options . extras . datesToAdd , datesToDel = _self . clndr . options . extras . datesToDel , newEndDate = _self . $endDateField . val ( ) . length ? _self . $endDateField . val ( ) : moment ( new Date ( ) , _self . dateFormatInternal ) . add ( 15 , 'years' ) . format ( _self . localeFormat ) , newEndDateMoment = newEndDate . length ? moment ( newEndDate , _self . localeFormat ) : moment ( new Date ( ) , _self . dateFormatInternal ) . add ( 15 , 'years' ) ; _self . clndr . options . constraints . endDate = moment ( newEndDate , _self . localeFormat ) . format ( _self . dateFormatInternal ) ; const outOfBoundsDatesToAdd = _self . clndr . options . extras . datesToAdd . filter ( EventCalendar . isInYear . bind ( this , newEndDateMoment ) ) . filter ( EventCalendar . isInMonth . bind ( this , newEndDateMoment ) ) . filter ( EventCalendar . isAfterDate . bind ( this , newEndDateMoment ) ) ; $ . each ( outOfBoundsDatesToAdd , function ( k , v ) { datesToAdd = datesToAdd . filter ( EventCalendar . doesNotMatchDate . bind ( this , v ) ) ; } ) ; _self . clndr . options . extras . datesToAdd = datesToAdd ; const outOfBoundsDatesToDel = _self . clndr . options . extras . datesToDel . filter ( EventCalendar . isInYear . bind ( this , newEndDateMoment ) ) . filter ( EventCalendar . isInMonth . bind ( this , newEndDateMoment ) ) . filter ( EventCalendar . isAfterDate . bind ( this , newEndDateMoment ) ) ; $ . each ( outOfBoundsDatesToDel , function ( k , v ) { datesToDel = datesToDel . filter ( EventCalendar . doesNotMatchDate . bind ( this , v ) ) ; } ) ; _self . clndr . options . extras . datesToDel = datesToDel ; if ( newEndDateMoment . isBefore ( _self . currentCalendarMonth ) ) { _self . clndr . setMonth ( newEndDateMoment . month ( ) ) ; } _self . setStartDateMaximum ( ) ; _self . updateReview ( ) ; _self . clndr . render ( ) ; _self . paintMonth ( _self . clndr . month ) ; }
Fired when the endDateField changes and re-renders the calendar to stop at the new endDate, removes any
 out-of-bounds dates from the datesToAdd / datesToDel arrays and repaints the month.
Fired when the endDateField changes and re - renders the calendar to stop at the new endDate removes any out - of - bounds dates from the datesToAdd / datesToDel arrays and repaints the month .
// Update the endDate constraint before re-rendering // Remove now out-of-bounds dates from the datesToAdd array // Update stored datesToAdd with outOfBounds date removed // Remove now out-of-bounds dates from the datesToDel array // Update stored datesToDel with outOfBounds date removed // If chosen end date is before the currently focused month, then refocus the calendar // Reset the startDateField `max` value to reflect the endDate value // Update the review information to reflect changes to out-of-bound dates // Render the changes