I create a textbox and add a Jquery UI datepicker.But when I select and click the button.the textbox doesnt get post and show an error message like(Notice: Undefined index: date_text in C:....................\file.php on line 57 ).But when I enter a date using keyboard without having a datepicker it will submit well.Please help me.How can I do this having datepicker
this is my jquery code
<script>
$(function() {
$( "#datepicker" ).datepicker();
$( "#datepicker" ).datepicker( "option", "dateFormat", "yy-mm-dd" );
});
</script>
this is my textfield
<div id="datetobe">Date to be dispose
<label for="date_to_dispose"> <input name="datepicker" type="text" id="datepicker" class="textfield" /></label>
</div>
You have to set the callback function for the datepicker.
http://jqueryui.com/demos/datepicker/
Events tab, onSelect event. RTM.