resetCalendar () {
        let _self = this;

        _self.clndr.options.extras.datesToAdd.length = 0;

        if (_self.originalDatesToAdd.length) {
            _self.clndr.options.extras.datesToAdd = [..._self.originalDatesToAdd]
        }

        _self.clndr.options.extras.datesToDel.length = 0;

        if (_self.originalDatesToDel.length) {
            _self.clndr.options.extras.datesToDel = [..._self.originalDatesToDel]
        }

        // Set the `selectedDate` to match the new start date
        _self.clndr.options.selectedDate = moment(_self.originalStartDate, _self.dateFormatInternal);

        // Reset start date to original value
        _self.clndr.options.constraints.startDate = _self.originalStartDate;

        if (typeof _self.$startDateField !== 'undefined') {
            _self.$startDateField.val(moment(_self.originalStartDate, _self.dateFormatInternal).format(_self.localeFormat));
        }

        // Reset end date to original value
        _self.clndr.options.constraints.endDate = _self.originalEndDate;

        // Reset end date field to starting value, unless that's 'today + 15 years'
        if (typeof _self.$endDateField !== 'undefined') {
            if (_self.originalEndDate != moment(new Date(), _self.dateFormatInternal).add(15, 'years').format(_self.dateFormatInternal)) {
                _self.$endDateField.val(moment(_self.originalEndDate, _self.dateFormatInternal).format(_self.localeFormat));
            }
            else {
                _self.$endDateField.val('');
            }
        }

        // Reset weekday checkboxes
        _self.$html.find('[name="ercal-weekdays"]').prop('checked', false);

        // Repopulate weekday checkboxes if we're resetting to the weekly pattern
        if ((_self.originalPattern === 'weekly') && _self.originalWeekdays.length) {
            $.each(_self.originalWeekdays, function() {
                _self.$html.find('[name="ercal-weekdays"][value="' + this + '"]').prop('checked', true);
            });
        }

        // Reset the stored recur pattern
        _self.setPattern(_self.originalPattern);

        // Reset the recur pattern field
        _self.$patternField.val(_self.originalPattern);
        _self.applyPattern();

        // Remove the review changes information
        _self.updateReview();

        // Reset the min/max values on the start/end date fields
        _self.setStartDateMaximum();
        _self.setEndDateMinimum();

        // Return to the initial view
        _self.clndr.setMonth(_self.clndr.options.startWithMonth.month());
        _self.paintMonth(_self.clndr.month, 'repeat-on');
    }
/**
     * Reverts all user changes to their initial state (when the calendar was initialised) and return the user to the 
     * initial view the calendar was loaded on (either `today` or the `startDate`).
     */
Reverts all user changes to their initial state (when the calendar was initialised) and return the user to the
initial view the calendar was loaded on (either `today` or the `startDate`).
Reverts all user changes to their initial state ( when the calendar was initialised ) and return the user to the initial view the calendar was loaded on ( either ` today ` or the ` startDate ` ) .
resetCalendar () {
        let _self = this;
        _self.clndr.options.extras.datesToAdd.length = 0;
        if (_self.originalDatesToAdd.length) {
            _self.clndr.options.extras.datesToAdd = [..._self.originalDatesToAdd]
        }
        _self.clndr.options.extras.datesToDel.length = 0;
        if (_self.originalDatesToDel.length) {
            _self.clndr.options.extras.datesToDel = [..._self.originalDatesToDel]
        }
        _self.clndr.options.selectedDate = moment(_self.originalStartDate, _self.dateFormatInternal);
        _self.clndr.options.constraints.startDate = _self.originalStartDate;
        if (typeof _self.$startDateField !== 'undefined') {
            _self.$startDateField.val(moment(_self.originalStartDate, _self.dateFormatInternal).format(_self.localeFormat));
        }
        _self.clndr.options.constraints.endDate = _self.originalEndDate;
        if (typeof _self.$endDateField !== 'undefined') {
            if (_self.originalEndDate != moment(new Date(), _self.dateFormatInternal).add(15, 'years').format(_self.dateFormatInternal)) {
                _self.$endDateField.val(moment(_self.originalEndDate, _self.dateFormatInternal).format(_self.localeFormat));
            }
            else {
                _self.$endDateField.val('');
            }
        }
        _self.$html.find('[name="ercal-weekdays"]').prop('checked', false);
        if ((_self.originalPattern === 'weekly') && _self.originalWeekdays.length) {
            $.each(_self.originalWeekdays, function() {
                _self.$html.find('[name="ercal-weekdays"][value="' + this + '"]').prop('checked', true);
            });
        }
        _self.setPattern(_self.originalPattern);
        _self.$patternField.val(_self.originalPattern);
        _self.applyPattern();
        _self.updateReview();
        _self.setStartDateMaximum();
        _self.setEndDateMinimum();
        _self.clndr.setMonth(_self.clndr.options.startWithMonth.month());
        _self.paintMonth(_self.clndr.month, 'repeat-on');
    }
resetCalendar ( ) { let _self = this ; _self . clndr . options . extras . datesToAdd . length = 0 ; if ( _self . originalDatesToAdd . length ) { _self . clndr . options . extras . datesToAdd = [ ... _self . originalDatesToAdd ] } _self . clndr . options . extras . datesToDel . length = 0 ; if ( _self . originalDatesToDel . length ) { _self . clndr . options . extras . datesToDel = [ ... _self . originalDatesToDel ] } _self . clndr . options . selectedDate = moment ( _self . originalStartDate , _self . dateFormatInternal ) ; _self . clndr . options . constraints . startDate = _self . originalStartDate ; if ( typeof _self . $startDateField !== 'undefined' ) { _self . $startDateField . val ( moment ( _self . originalStartDate , _self . dateFormatInternal ) . format ( _self . localeFormat ) ) ; } _self . clndr . options . constraints . endDate = _self . originalEndDate ; if ( typeof _self . $endDateField !== 'undefined' ) { if ( _self . originalEndDate != moment ( new Date ( ) , _self . dateFormatInternal ) . add ( 15 , 'years' ) . format ( _self . dateFormatInternal ) ) { _self . $endDateField . val ( moment ( _self . originalEndDate , _self . dateFormatInternal ) . format ( _self . localeFormat ) ) ; } else { _self . $endDateField . val ( '' ) ; } } _self . $html . find ( '[name="ercal-weekdays"]' ) . prop ( 'checked' , false ) ; if ( ( _self . originalPattern === 'weekly' ) && _self . originalWeekdays . length ) { $ . each ( _self . originalWeekdays , function ( ) { _self . $html . find ( '[name="ercal-weekdays"][value="' + this + '"]' ) . prop ( 'checked' , true ) ; } ) ; } _self . setPattern ( _self . originalPattern ) ; _self . $patternField . val ( _self . originalPattern ) ; _self . applyPattern ( ) ; _self . updateReview ( ) ; _self . setStartDateMaximum ( ) ; _self . setEndDateMinimum ( ) ; _self . clndr . setMonth ( _self . clndr . options . startWithMonth . month ( ) ) ; _self . paintMonth ( _self . clndr . month , 'repeat-on' ) ; }
Reverts all user changes to their initial state (when the calendar was initialised) and return the user to the
 initial view the calendar was loaded on (either `today` or the `startDate`).
Reverts all user changes to their initial state ( when the calendar was initialised ) and return the user to the initial view the calendar was loaded on ( either ` today ` or the ` startDate ` ) .
// Set the `selectedDate` to match the new start date // Reset start date to original value // Reset end date to original value // Reset end date field to starting value, unless that's 'today + 15 years' // Reset weekday checkboxes // Repopulate weekday checkboxes if we're resetting to the weekly pattern // Reset the stored recur pattern // Reset the recur pattern field // Remove the review changes information // Reset the min/max values on the start/end date fields // Return to the initial view