wrapAround(hov_section, new_value) {
    let fix_const = this.fix_const;
    let min_val = this.min_year;
    let max_val = this.max_year;
    let maxDays = this.daysInSelectedMonth;
    if (hov_section == 'year') {
      new_value = new_value > max_val ? new_value - fix_const : new_value < min_val ? new_value + fix_const : new_value;
    }
    if (hov_section == 'month') {
      //console.log('this is called and the value is: ' + new_value)
      new_value = new_value == 0 ? 12 : new_value
      new_value = new_value == 13 ? 1 : new_value
    }
    if (hov_section == 'day') {
      new_value = new_value == 0 ? maxDays : new_value
    }
    if (hov_section == 'hour' || hov_section == 'minute') {
      new_value = new_value == -1 && hov_section == 'minute' ? 59 : new_value == -1 && hov_section == 'hour' ? 23 : new_value 
      new_value = new_value == 60 && hov_section == 'minute' ? 0 : new_value == 24 && hov_section == 'hour' ? 0 : new_value 
    }
    console.log('wraparound was indeed called, new value is: ' + new_value);
    return new_value
  }
// Appropriate wrap around based on section
Appropriate wrap around based on section
Appropriate wrap around based on section
wrapAround(hov_section, new_value) {
    let fix_const = this.fix_const;
    let min_val = this.min_year;
    let max_val = this.max_year;
    let maxDays = this.daysInSelectedMonth;
    if (hov_section == 'year') {
      new_value = new_value > max_val ? new_value - fix_const : new_value < min_val ? new_value + fix_const : new_value;
    }
    if (hov_section == 'month') {
      new_value = new_value == 0 ? 12 : new_value
      new_value = new_value == 13 ? 1 : new_value
    }
    if (hov_section == 'day') {
      new_value = new_value == 0 ? maxDays : new_value
    }
    if (hov_section == 'hour' || hov_section == 'minute') {
      new_value = new_value == -1 && hov_section == 'minute' ? 59 : new_value == -1 && hov_section == 'hour' ? 23 : new_value 
      new_value = new_value == 60 && hov_section == 'minute' ? 0 : new_value == 24 && hov_section == 'hour' ? 0 : new_value 
    }
    console.log('wraparound was indeed called, new value is: ' + new_value);
    return new_value
  }
wrapAround ( hov_section , new_value ) { let fix_const = this . fix_const ; let min_val = this . min_year ; let max_val = this . max_year ; let maxDays = this . daysInSelectedMonth ; if ( hov_section == 'year' ) { new_value = new_value > max_val ? new_value - fix_const : new_value < min_val ? new_value + fix_const : new_value ; } if ( hov_section == 'month' ) { new_value = new_value == 0 ? 12 : new_value new_value = new_value == 13 ? 1 : new_value } if ( hov_section == 'day' ) { new_value = new_value == 0 ? maxDays : new_value } if ( hov_section == 'hour' || hov_section == 'minute' ) { new_value = new_value == - 1 && hov_section == 'minute' ? 59 : new_value == - 1 && hov_section == 'hour' ? 23 : new_value new_value = new_value == 60 && hov_section == 'minute' ? 0 : new_value == 24 && hov_section == 'hour' ? 0 : new_value } console . log ( 'wraparound was indeed called, new value is: ' + new_value ) ; return new_value }
Appropriate wrap around based on section
Appropriate wrap around based on section
//console.log('this is called and the value is: ' + new_value)