<!doctype html>
<html class="no-js" lang="en">
  <head>
    <meta charset="utf-8">
    <title>Send me a reminder</title>
    <meta name="description" content="Add reminders through a simple API ">
    <meta name="viewport" content="width=device-width, initial-scale=1">
  </head>
  <body>
    <h2>Send me a reminder!</h2>
    <p><strong>{{.SuccessMsg}}</strong></p>
    <form action="/{{.Path}}/" method="POST">
      <div>
        <label for="time">Time *: </label>
	<input id="time" type="time" name="time" value="">
      </div>
      <div>
        <label for="message">Message *: </label>
        <input type="text" name="message">
      </div>
      <div>
        <label for="day">Day: </label>
        <input type="text" name="day" value="today">
      </div>
      <div><input type="submit" value="Submit"></div>
    </form>
    <script>
      now = new Date();
      then = new Date(now.getTime() + 30*60000);
      inThirtyMinutes = then.getHours() + ":" + then.getMinutes();
      document.getElementById("time").setAttribute("value", inThirtyMinutes);
    </script>
  </body>
</html>

<!doctype html>
<html class="no-js" lang="en">
  <head>
    <meta charset="utf-8">
    <title>Send me a reminder</title>
    <meta name="description" content="Add reminders through a simple API ">
    <meta name="viewport" content="width=device-width, initial-scale=1">
  </head>
  <body>
    <h2>Send me a reminder!</h2>
    <p><strong>{{.SuccessMsg}}</strong></p>
    <form action="/{{.Path}}/" method="POST">
      <div>
        <label for="time">Time *: </label>
	<input id="time" type="time" name="time" value="">
      </div>
      <div>
        <label for="message">Message *: </label>
        <input type="text" name="message">
      </div>
      <div>
        <label for="day">Day: </label>
        <input type="text" name="day" value="today">
      </div>
      <div><input type="submit" value="Submit"></div>
    </form>
    <script>
      now = new Date();
      then = new Date(now.getTime() + 30*60000);
      inThirtyMinutes = addZero(then.getHours()) + ":" + addZero(then.getMinutes());
      document.getElementById("time").setAttribute("value", inThirtyMinutes);
      function addZero(i) {
        if (i < 10) {
          i = "0" + i;
        }
        return i;
      }
    </script>
  </body>
</html>

Fix javascript bug with addZero function
Fix javascript bug with addZero function
