title: Can't get date object from Bootstrap DateTimePicker via JQuery
body: <p>I can't get the date object after selecting the datetime from the datetimepicker box. How can I get the datetime object and transform it into unix integer?</p>
  
  <p>Here's my html code:</p>
  
  <pre><code>&lt;div class="form-group" align="center"&gt;
  &lt;div class='input-group date' id="startDate"&gt;
      &lt;input type='text' class="form-control" name="org_startDate" placeholder="Wo" data-format="yyyy-MM-dd hh:mm:ss"/&gt;
      &lt;span class="input-group-addon"&gt;
          &lt;span class="glyphicon glyphicon-calendar"&gt;&lt;/span&gt;
      &lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>Here's my css:</p>
  
  <pre><code>&lt;link href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.7.14/css/bootstrap-datetimepicker.css" rel="stylesheet"/&gt;
  </code></pre>
  
  <p>And here my js:</p>
  
  <pre><code>&lt;script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  
  
  
  
  <pre><code>jQuery(function () {
      jQuery('#startDate').datetimepicker({
          locale: 'de',
          format: 'dd, DD.MM.YYYY, HH:mm',
          minDate: moment(),
      });
  });
  
  
  // WHAT CODE DO I NEED HERE TO GET DATE OBJECT AND TRANSFORM IT INTO UNIX INTEGER
  var dateStr = $("#startDate").find("input").val();
  var date = Date.parse(dateStr);
  
  alert(date + " " + new Date(date));
  </code></pre>