title: Calculate secondary times form timepicker input
body: <p>Once a user has selected their start time, I then need to calculate a start time for us which is say 75 minutes before the time they selected, and a finish time for us which is say 85 minutes after their selected time using javascript. It does need to be in minutes only.</p>
  <p>So the user field is a timepicker only field displaying only time as HH:MM</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input type="text" id="time" name="time" /&gt; //User input from timepicker
  &lt;input type="text" id="start_time" name="start_time" /&gt;// Start time for us 75 minutes before
  &lt;input type="text" id="start_time" name="start_time" /&gt;//End time for us 85 minutes after</code></pre>
  </div>
  </div>
  </p>
  <p>Please can anyone help?</p>
  <p>I have tried various things I have found, but what I am searching for is something like this which calculates the day of the week and enters it in a second field for submition:
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input type="text" id="date" name="date" readonly="readonly" onChange="showDate(this.value)" /&gt;</code></pre>
  </div>
  </div>
  </p>
  <pre><code>function showDate(getdate) {
              var selectedDate = new Date(getdate);
              var dateformat = getdate.split('-')
              var displaydate = document.getElementById('day')
              var days = [&quot;Sunday&quot;, &quot;Monday&quot;, &quot;Tuesday&quot;, &quot;Wednesday&quot;, &quot;Thursday&quot;, &quot;Friday&quot;, &quot;Saturday&quot;];
  
              if (displaydate) {
                  
                   
              document.getElementById('day').value=days[selectedDate.getDay()];
              }
          }
  </code></pre>
  <p>If I could have a script like this which adds or subtracts minutes from timepicker input field and puts it in a second input as HH:MM, that would be perfect!</p>
  <p>So for example, if the user selected 07:30 in the timepicker, the script takes this time from this field and deducts 75 minutes (MUST BE IN MINUTES) to make a time of 06:15 in another input field, and same for adding minutes as well in another field.</p>