I have an INPUT tag with the value attribute set to "15-May-2012" and I have initialized a JQuery UI Datepicker with it as follows:
<input type="text" name="schedule" id="schedule"
value="15-May-2012">
<script type="text/javascript">
$(function() {
$( "#schedule" ).datepicker();
$( "#schedule" ).datepicker( "option", "dateFormat", "d-M-yy" );
});
</script>
For some reason, the value of the INPUT tag is being cleared once the Datepicker is initialized. Note that the value in the INPUT field matches the format set for the Datepicker.
Why is the value cleared?
Here is a live example of it: http://agnelkurian.com/lab/datepicker_example.html