title: Cannot get the value of datepicker of JQuery
body: <p>I'm trying to use datepicker of Jquery, but it seems I cannot catch the selected value of my datepicker.</p>
  
  <p>My added HTML is:</p>
  
  <pre><code>test Date:&lt;input type="text" id="testDate" placeholder="yyyy-mm-dd"/&gt;
  &lt;input type="button" id="testbtn" value="my button"/&gt;
  </code></pre>
  
  <p>in my javascript inside</p>
  
  <pre><code>$(document).ready(function() { 
  </code></pre>
  
  <p>I have the following code:</p>
  
  <pre><code>$("#testDate").datepicker({dateFormat: "yy-mm-dd"});
  $('#testbtn').click(function() {
      console.log($('#testDate').val());
  });
  </code></pre>
  
  <p>but nothing is written in my console! Am I missing something? Please let me know if you need more clarification.</p>