title: format jquery timepicker to load into django TimeField
body: <p>I have a problem formatting my <a href="http://trentrichardson.com/examples/timepicker/" rel="nofollow">jquery timepicker</a>. My problem is that I want to have the time show up in HH:MM AM/PM format in the form (so the user can see it that way), but load as military time (%H:%M) into the timefield. My formfield looks like this:</p>
  
  <pre><code>    if isinstance(f, models.TimeField):
      formfield.widget.format = '%H:%M'
      formfield.widget.attrs.update({'class':'timepicker', 'readonly':'true'})
  </code></pre>
  
  <p>I'm using Postgresql with <code>time without time zone</code> type. The jquery (from the link above) looks is this: </p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
       $(document).ready(function() {
              $( ".timepicker" ).timepicker({
                  showPeriod: true,
                  showLeadingZero: true
              });
       });
   &lt;/script&gt;
  </code></pre>
  
  <p>If I don't use showPeriod and showLoadingZero, it works fine, but it's not as user friendly as I'd like.</p>
  
  <p>Thanks!</p>
  
  <p>EDIT: I'm using the templating system, so my html for that field looks like this:</p>
  
  <pre><code>    &lt;div class="fieldWrapper"&gt;
      {{ form.starttime.errors }} 
      &lt;label for="id_starttime"&gt;Start Time:&lt;/label&gt; 
      {{ form.starttime }} 
      &lt;/div&gt;  
  </code></pre>