title: How to make JQuery UI TimePicker format time in 24 H format?
body: <p>I want to format time in 24 h format. In the documentation it says that time format is specified by <code>timeFormat, altTimeFormat, and pickerTimeFormat</code>. I put the following lines into <code>this._defaults</code></p>
  
  <pre><code>        timeFormat: 'HH:mm',
          altTimeFormat: "HH:mm",
          pickerTimeFormat: "HH:mm"
  </code></pre>
  
  <p>But still, the time is formatted in 12 H AM/PM format, such as here:</p>
  
  <p><img src="https://i.imgur.com/SCOM7.jpg" alt=""></p>
  
  <p>In fact, time inside the component is shown correctly, but time in the text field is not output correctly. </p>
  
  <p>I debugged the script with Firebug and found that the problem lies in the argument of the following method call:</p>
  
  <pre><code>$.datepicker.formatTime = function(format, time, options) {
  </code></pre>
  
  <p>Here, the argument <code>format</code> has the value <code>h:mmtt</code>.</p>
  
  <p>This method is called by <code>_onTimeChange</code> function:</p>
  
  <pre><code>this.formattedTime = $.datepicker.formatTime(o.timeFormat, this, o);
  </code></pre>
  
  <p>Here, the variable <code>o</code> is set to:</p>
  
  <pre><code>o = this._defaults,
  </code></pre>
  
  <p>I have already defined <code>timeFormat</code> inside the initilization of <code>this._defaults</code>. But somehow this is changed then. I couldn't find out when it is changed?</p>
  
  <p>Can someone show me the right way to format time in 24 H format?</p>