title: jQuery UI Datepicker Inline - submiting form on click
body: <p>I am trying to submit form when date is clicked on datepicker. I have managed to submit, but cannot pass chosen date to hidden field of the form. So, form submits, but date is not sent (</p>
  
  <p>I am sure it must be simple to do, but I am not experienced with js, so any help is appreciated.</p>
  
  <p>Here's the code: </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    $(document).ready($(function(){
  
      var $hiddenInput = $('#hiddenFieldID');
  
      $('#datepicker').datepicker({ inline: true })
       .bind('click', function(){ $('#myFormID').submit();})
       .bind('hiddenFieldID',function(e, hiddenFieldID, $td) { $hiddenInput.val(hiddenFieldID.asString()); });
        }));
   &lt;/script&gt;
  
  &lt;div id="datepicker"&gt;&lt;/div&gt;
  
  &lt;form id="myFormID" action="index.php" method="GET"&gt;
  &lt;input type="hidden" name="date" id="hiddenFieldID" value=""&gt;
  &lt;/form&gt;
  </code></pre>