title: Bootstrap datepicker ev.date format
body: <p>I'm trying to use <a href="https://github.com/eternicode/bootstrap-datepicker" rel="nofollow">https://github.com/eternicode/bootstrap-datepicker</a>. I have already this code:</p>
  
  <pre><code>&lt;script&gt;
  var date = new Date();
  date.setDate(date.getDate());
     $('#datepicker').ready(function() {
  var datum = $('#datepicker').datepicker({ 
  
  language: "cs-CZ", 
  startDate: date,
  format: 'yyyy/mm/dd',
  todayHighlight: true 
  }) 
  .on('changeDate', function(ev) {
    var datumy = new Date(ev.date);
    alert(datumy);
      $(this).datepicker('hide');
      $('#datumpick').slideUp(100);
      alert
         $.ajax({
     url: 'http://***********/******.php',
     data: {druh: '30', vyberdatapicker: datumy},
     type: "POST",
     success: function(data){
              $('#result').html(data);   
     }
     });
  
    });
  
  });
    &lt;/script&gt;
  </code></pre>
  
  <p>and this element which call this func. </p>
  
  <pre><code>&lt;a href="javascript:void(0)" class="btn" id="datepicker" data-date-format="dd-mm-yyyy"&gt;Vybrat datum&lt;/a&gt;
  </code></pre>
  
  <p>This code works perfectly, but I'm not able get date in right format. If <code>alert(datumy)</code> appears, it show me date in this format <code>Thu Jun 19 2014 00:00:00 GMT+0200 (CEST)</code>, but I need this format <code>2014-06-17</code>.</p>