<script type="text/javascript">
jQuery(function(){
$('.vDateField').datepicker();
$('.vDateField').datepicker( "option", "dateFormat", 'dd/mm/yy' );
});
</script>
I have a date field which uses a datepicker to select a date in dd/mm/yy format. This works great for the initial page submit, but when the page is reloaded with the selected date pre-populated in the date field.. datepicker is formatting it again it seems. It is swapping the days and months around so if the user enteres 02/05/2013 the calender date field would show 05/02/2013 when the page has reloaded.
The date going through to the server is fine, it's just when the page has reloaded the pre-populated date field has been reformatted.