title: how to make onclick event when clicking the date from datepicker UI
body: <p>hi guys i have try to make a select data function with jquery with onclick event that have triggering the date from datepicker.
  i have try to make a code but seems not work at all.</p>
  
  <p>this is the textboxt id's that contain the datepicker call function. <code>$(#date)</code>
  i have try to make a code for selecting my data. 
  this is the code.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).on('click','#date',function(e) {
   var data = $("#form_input10").serialize();
     
   $('#table_s tbody').empty();
          $.ajax({
     data: data,
              type: "Post",
              url: "../php/termocouple/get_date.php",
              success: function(data){
    var list = JSON.parse(data);
    for(var i = 0; i &lt; list.length; i++){
   $('#date1').val((list[i]['tanggal2']));
    }
  }
  });
  });
  
    </code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>the condition when the datepicker running is like this. when the textbox clicked then the datepicker will be showing. nah when i use my code, the condition like this the 1st click is for show the datepicker that ( from this condition the textbox doesn't have any value of the date) the the datepicker showing and i select the date. i need do one click again on the textbox for showing my data.</p>
  
  <p>please someone help me to solve this
  please </p>