client/src/components/book/Book.js
// Set the title of the schedule that the user selects
Set the title of the schedule that the user selects
Set the title of the schedule that the user selects
scheduleHandler(e) {
    var today = new Date();
    var thisMonth = today.getMonth();
    var thisYear = today.getFullYear();
    var start = firstOfMonthUTC(thisYear, thisMonth);
    start = addMinutes(start, this.state.offset);
    var end = firstOfMonthUTC(thisYear, thisMonth + 1);
    end = addMinutes(end, this.state.offset);
    this.setState(
      {
        scheduleTitle: e.target.value,
      },
      () => {
        this.props.getSchedule(
          this.props.match.params.userURL,
          this.state.scheduleTitle,
          start,
          end
        );
      }
    );
  }
scheduleHandler ( e ) { var today = new Date ( ) ; var thisMonth = today . getMonth ( ) ; var thisYear = today . getFullYear ( ) ; var start = firstOfMonthUTC ( thisYear , thisMonth ) ; start = addMinutes ( start , this . state . offset ) ; var end = firstOfMonthUTC ( thisYear , thisMonth + 1 ) ; end = addMinutes ( end , this . state . offset ) ; this . setState ( { scheduleTitle : e . target . value , } , ( ) => { this . props . getSchedule ( this . props . match . params . userURL , this . state . scheduleTitle , start , end ) ; } ) ; }
Set the title of the schedule that the user selects
Set the title of the schedule that the user selects
// Gets all slots from the 1st to end of today's month (converted timezone)