title: HTML input of type time in flask - how to autocomplete minutes/seconds if missing
body: <p>I'm using a form with a submit button that is processed through Flask in order to add a new task (a row) in a SQLite database called tasks.</p>
  
  <p>Here is the HTML <code>&lt;div/&gt;</code> container with the respective <strong>block content</strong> for the Flask part:</p>
  
  <pre><code>&lt;div class="container"&gt;
      {% block content %}
      &lt;form name="task_form" method="post" action=""&gt;
          {{ form.csrf_token }}
          &lt;input type="text" name="task_title" placeholder="Title..."/&gt;
          &lt;input type="text" name="task_description" placeholder="Description..."/&gt;
          &lt;input type="date" name="task_date_due" placeholder="Due date..."/&gt;
          &lt;input type="time" name="task_clock_due" placeholder="Due date (clock)..." step="1"/&gt;
          &lt;input type="submit" name="task_submit" value="Add task"/&gt;
      &lt;/form&gt;
      {% endblock %}
  &lt;/div&gt;
  </code></pre>
  
  <p>On the Python side I have the following function that processes the GET and POST requests for the specific page:</p>
  
  <pre><code>@app.route('/db', methods=['GET', 'POST'])
  def db():
  
    # Create form 
    form = TaskForm(request.form)
    # Initialize DB connection
    init_db_conn()
  
    # Handle POST request
    if request.method == 'POST':
      # Get form data
      title = request.form['task_title']
      description = request.form['task_description']
      date = request.form['task_date_due']
      time = request.form['task_clock_due']
  
      if title != '' and description != '' and date != '' and time != '':
        str_dtime = date + ' ' + time
        db_conn = get_db_conn()
        create_task(db, title, description, str_dtime)
   elif request.method == 'GET':
     pass
  
   db_conn = get_db_conn()
   cur = db_conn.cursor()
   cur.execute('SELECT * FROM tasks')
   tasks = cur.fetchall()
  
   tmp = render_template('db.html', form=form, tasks=tasks)
  
   return tmp
  </code></pre>
  
  <p>I'm new to Flask, my HTML skills are pretty rusty so I might be missing something but whenever I submit the data from my form through the page, I haven't entered the full time stamp (I use separate date and time inputs to allow using the calendar popup and time formatted field; can be done in a better way but for now it's what it is), I get empty string.</p>
  
  <p><strong>Example:</strong></p>
  
  <ul>
  <li>If I have entered <strong>08:00:-- PM</strong> I will get empty string</li>
  <li>If I have entered <strong>08:--:-- PM</strong> I will get empty string.</li>
  </ul>
  
  <p>What I was expecting is to get an autocompletion of the minutes/seconds as long as the hour has been selected.</p>
  
  <p><strong>Example:</strong></p>
  
  <ul>
  <li>If I have entered <strong>08:00:-- PM</strong> I will get <strong>08:00:00 PM</strong> (internally depending on the format I have picked on the Python side it will be converted to <strong>20:00:00</strong>)</li>
  <li>If I have entered <strong>08:--:-- PM</strong> I will get <strong>08:00:00 PM</strong> (internally depending on the format I have picked on the Python side it will be converted to <strong>20:00:00</strong>)</li>
  </ul>
  
  <p>Is there an easy way to fix this behaviour or do I have to create a custom input field? I can probably add a default value or just the current time as value to prevent this but it just goes around the issue. In case the user deletes the default value to enter another one and forgets to fill all the info, the problem will occur again.</p>