title: Setting date and time in JQuery datetimepicker
body: <p>I have a situation where I'm trying to use Trent Richardson's <a href="http://trentrichardson.com/examples/timepicker/" rel="noreferrer">datetimepicker JQuery extension</a> to have users select dates and times in one go. </p>
  
  <p>But before that, I want to set the date and time so that the datetimepicker's input box displays a default date and time which would be set from the server. A user would then click inside the input box to call datetimepicker, then the default date and time would appear on datetimepicker. The user can then override these if necessary.</p>
  
  <p>So far, in code of mine I have:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          $(function(){
              $('.example-container &gt; pre').each(function(i){
                   eval($(this).text());
              });
  
              $('#example1').datetimepicker('setDate', (new Date(2010, 11, 20, 16, 03)));
  
          });
  &lt;/script&gt;
  </code></pre>
  
  <p>Which will set the date correctly but not the time and hour and minute sliders. The time also displays as 00 03 rather than 16 03. </p>
  
  <p>Can anyone tell me what I'm doing wrong or not doing here so that datetimepicker shows correct default settings?</p>
  
  <p>Other settings are:</p>
  
  <pre><code>$('#example1').datetimepicker({                                                    
                          dateFormat: 'dd mm yy',
                          timeFormat: 'hh mm',
                          showMinute: false,
                          showSecond: false,
                          separator: ' ',
  
                      });
  </code></pre>
  
  <p>Thanks</p>