Submit the form on jQuery datepicker change event

Submit the form on jQuery datepicker change event

Submitting the form to the server when selecting the date in datepicker control.

change event handler is invoked when datepicker selects the date.

submit function is used to submit the form in the server based on mentioned action url.

<script type="text/javascript">
$( function() {
   $('#datepicker').change(function(){
      $('#myform').submit();
   });
});
</script>

Example form:
<form id="myform" action="<?php $_PHP_SELF ?>" method="POST">
<p>Date: <input type="text" id="datepicker" name="datepicker"></p>
<input type="submit" style="visibility: hidden;" />
</form>

});

Privacy Policy  |  Copyrightcopyright symbol2020 - All Rights Reserved.  |  Contact us   |  Report website issues in Github   |  Facebook page   |  Google+ page

Email Facebook Google LinkedIn Twitter
^