toggleDay (target) {
        let _self = this,
            $elem = $(target.element),
            date = target.date,
            datesToAdd = _self.clndr.options.extras.datesToAdd,
            datesToDel = _self.clndr.options.extras.datesToDel;

        // Don't allow interactions on dates in the past, or the event start date
        if ($elem.hasClass('inactive') || $elem.hasClass('selected')) {
            return;
        }
    
        // If a date is selected
        if ($elem.hasClass('event')) {
            if ($elem.hasClass('event-del')) {
                // Restore initial styling by removing it from the datesToDel collection
                _self.clndr.options.extras.datesToDel = datesToDel.filter(EventCalendar.doesNotMatchDate.bind(this, date));
            } 
            else {
                // Set it to [4. To Delete] by adding it to the datesToDel collection
                datesToDel.push(date);
            }
        }

        // If a date is not already selected
        else {
            // If the button had 'event-add', then a pattern applied over the top
            if ($elem.hasClass('event-add') && $elem.hasClass('event-repeat')) {
                // Unset it from [3. To Add] by removing it from the datesToAdd collection
                _self.clndr.options.extras.datesToAdd = datesToAdd.filter(EventCalendar.doesNotMatchDate.bind(this, date));

                // Set it to [4. To Delete] by adding it to the datesToDel collection
                datesToDel.push(date);
            }
            // If the button is currently [4. To Delete]
            else if ($elem.hasClass('event-add')) {
                // Unset it from [3. To Add] by removing it from the datesToAdd collection
                _self.clndr.options.extras.datesToAdd = datesToAdd.filter(EventCalendar.doesNotMatchDate.bind(this, date));

                // Announce the new status through a live region (instead of the previous status)
                _self.updateLiveRegion('Unselected. Event will not repeat on ' + date.format(_self.dateFormatLong));
            }
            else if ($elem.hasClass('event-repeat')) {
                if ($elem.hasClass('event-del')) {
                    // Remove it from the datesToDel collection
                    _self.clndr.options.extras.datesToDel = datesToDel.filter(EventCalendar.doesNotMatchDate.bind(this, date));
                } 
                else {
                    // Set it to [4. To Delete] by adding it to the datesToDel collection
                    datesToDel.push(date);
                }
            }
            // If the button is currently [1. Neutral]
            else if ( 
                !$elem.hasClass('event-add') 
                && !$elem.hasClass('event-del') 
                && !$elem.hasClass('selected')
            ) {
                // Set it to [3. To Add]
                datesToAdd.push(date);
            }

            // If the button is currently [5. Selected]
            else {
                // Remove it from the datesToDel collection
                _self.clndr.options.extras.datesToDel = datesToDel.filter(EventCalendar.doesNotMatchDate.bind(this, date));
            }
        }

        _self.paintMonth(_self.clndr.month);
        _self.updateReview();
    }
/**
     * Fired when a day is clicked, and chooses which actions should be performed based on the classes present on the 
     * button's parent `<td>`.
     * 
     * @param {jquery} target The day being clicked
     * 
     * States:
     *      1. Netural      - The default state of the button
     *      2. To Repeat    - Defined by the recurrence pattern, to be added to the list of selected dates when saved
     *      3. To Add       - Defined by user selection, to be added to the list of selected dates when saved
     *      4. To Delete    - Defined by user selection, To be removed from the list of selected dates when saved, 
     *                          or to prevent a pattern taking effect on this date
     *      5. Selected     - The start date for the recurrence pattern
     */
Fired when a day is clicked, and chooses which actions should be performed based on the classes present on the
button's parent ``.

@param {jquery} target The day being clicked

1. Netural      - The default state of the button
2. To Repeat    - Defined by the recurrence pattern, to be added to the list of selected dates when saved
3. To Add       - Defined by user selection, to be added to the list of selected dates when saved
4. To Delete    - Defined by user selection, To be removed from the list of selected dates when saved,
or to prevent a pattern taking effect on this date
5. Selected     - The start date for the recurrence pattern
Fired when a day is clicked and chooses which actions should be performed based on the classes present on the button ' s parent ` ` . @param { jquery } target The day being clicked 1 . Netural - The default state of the button 2 . To Repeat - Defined by the recurrence pattern to be added to the list of selected dates when saved 3 . To Add - Defined by user selection to be added to the list of selected dates when saved 4 . To Delete - Defined by user selection To be removed from the list of selected dates when saved or to prevent a pattern taking effect on this date 5 . Selected - The start date for the recurrence pattern
toggleDay (target) {
        let _self = this,
            $elem = $(target.element),
            date = target.date,
            datesToAdd = _self.clndr.options.extras.datesToAdd,
            datesToDel = _self.clndr.options.extras.datesToDel;
        if ($elem.hasClass('inactive') || $elem.hasClass('selected')) {
            return;
        }
        if ($elem.hasClass('event')) {
            if ($elem.hasClass('event-del')) {
                _self.clndr.options.extras.datesToDel = datesToDel.filter(EventCalendar.doesNotMatchDate.bind(this, date));
            } 
            else {
                datesToDel.push(date);
            }
        }
        else {
            if ($elem.hasClass('event-add') && $elem.hasClass('event-repeat')) {
                _self.clndr.options.extras.datesToAdd = datesToAdd.filter(EventCalendar.doesNotMatchDate.bind(this, date));
                datesToDel.push(date);
            }
            else if ($elem.hasClass('event-add')) {
                _self.clndr.options.extras.datesToAdd = datesToAdd.filter(EventCalendar.doesNotMatchDate.bind(this, date));
                _self.updateLiveRegion('Unselected. Event will not repeat on ' + date.format(_self.dateFormatLong));
            }
            else if ($elem.hasClass('event-repeat')) {
                if ($elem.hasClass('event-del')) {
                    _self.clndr.options.extras.datesToDel = datesToDel.filter(EventCalendar.doesNotMatchDate.bind(this, date));
                } 
                else {
                    datesToDel.push(date);
                }
            }
            else if ( 
                !$elem.hasClass('event-add') 
                && !$elem.hasClass('event-del') 
                && !$elem.hasClass('selected')
            ) {
                datesToAdd.push(date);
            }
            else {
                _self.clndr.options.extras.datesToDel = datesToDel.filter(EventCalendar.doesNotMatchDate.bind(this, date));
            }
        }
        _self.paintMonth(_self.clndr.month);
        _self.updateReview();
    }
toggleDay ( target ) { let _self = this , $elem = $ ( target . element ) , date = target . date , datesToAdd = _self . clndr . options . extras . datesToAdd , datesToDel = _self . clndr . options . extras . datesToDel ; if ( $elem . hasClass ( 'inactive' ) || $elem . hasClass ( 'selected' ) ) { return ; } if ( $elem . hasClass ( 'event' ) ) { if ( $elem . hasClass ( 'event-del' ) ) { _self . clndr . options . extras . datesToDel = datesToDel . filter ( EventCalendar . doesNotMatchDate . bind ( this , date ) ) ; } else { datesToDel . push ( date ) ; } } else { if ( $elem . hasClass ( 'event-add' ) && $elem . hasClass ( 'event-repeat' ) ) { _self . clndr . options . extras . datesToAdd = datesToAdd . filter ( EventCalendar . doesNotMatchDate . bind ( this , date ) ) ; datesToDel . push ( date ) ; } else if ( $elem . hasClass ( 'event-add' ) ) { _self . clndr . options . extras . datesToAdd = datesToAdd . filter ( EventCalendar . doesNotMatchDate . bind ( this , date ) ) ; _self . updateLiveRegion ( 'Unselected. Event will not repeat on ' + date . format ( _self . dateFormatLong ) ) ; } else if ( $elem . hasClass ( 'event-repeat' ) ) { if ( $elem . hasClass ( 'event-del' ) ) { _self . clndr . options . extras . datesToDel = datesToDel . filter ( EventCalendar . doesNotMatchDate . bind ( this , date ) ) ; } else { datesToDel . push ( date ) ; } } else if ( ! $elem . hasClass ( 'event-add' ) && ! $elem . hasClass ( 'event-del' ) && ! $elem . hasClass ( 'selected' ) ) { datesToAdd . push ( date ) ; } else { _self . clndr . options . extras . datesToDel = datesToDel . filter ( EventCalendar . doesNotMatchDate . bind ( this , date ) ) ; } } _self . paintMonth ( _self . clndr . month ) ; _self . updateReview ( ) ; }
Fired when a day is clicked, and chooses which actions should be performed based on the classes present on the
 button's parent `<td>`.
Fired when a day is clicked and chooses which actions should be performed based on the classes present on the button ' s parent ` <td > ` .
// Don't allow interactions on dates in the past, or the event start date // If a date is selected // Restore initial styling by removing it from the datesToDel collection // Set it to [4. To Delete] by adding it to the datesToDel collection // If a date is not already selected // If the button had 'event-add', then a pattern applied over the top // Unset it from [3. To Add] by removing it from the datesToAdd collection // Set it to [4. To Delete] by adding it to the datesToDel collection // If the button is currently [4. To Delete] // Unset it from [3. To Add] by removing it from the datesToAdd collection // Announce the new status through a live region (instead of the previous status) // Remove it from the datesToDel collection // Set it to [4. To Delete] by adding it to the datesToDel collection // If the button is currently [1. Neutral] // Set it to [3. To Add] // If the button is currently [5. Selected] // Remove it from the datesToDel collection