title: Bootstrap-datepicker eternicode get date
body: <p>I'm completely new to js/jquery. For my django app i need to get selected date and then process it with ajax script.</p>
  
  <p>I'm using bootstrap-datepicker from eternicode. Here is my html:</p>
  
  <blockquote>
  <pre><code>&lt;form style="color: white;" class="form-date" role="form" action="" method="get"&gt;
     &lt;div class="form-group" id="datepicker"&gt;
         &lt;div&gt;&lt;/div&gt;
         &lt;input type="hidden" name="dt_due" id="dt_due"&gt;
     &lt;/div&gt;
     &lt;button type="submit" class="btn btn-default btn-lg btn-home"&gt;Go to summary&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  </blockquote>
  
  <p>And here is my js for testing:</p>
  
  <pre><code>$('#datepicker div').datepicker({
      language:"fr",
      startDate: "+1d"
  }).on('changeDate', function(event) {
      var date = ?????;
      alert("Chosen date is: " + date);
  });
  </code></pre>
  
  <p>How do i assign selected value to <em>var date</em>? I've tried</p>
  
  <pre><code>var date = $('#dt_due').datepicker('getDate');
  </code></pre>
  
  <p>But date is null then.</p>