Hi,
I have implemented a jquery datepicker in a free format question. I want to display a date format different that the data saved.
date display : dd/mm/yyyy
and date saved : yyyy-mm-dd.
See my code :
html
<input type="text" class=PS4_date>
<input type="hidden" name=PS4_date >
JS
<script type="text/javascript">
$(function() {
$('.PS4_date').each(function(){
var alt=$(this).next();
$(this).datepicker({
minDate: "01/01/1900",
maxDate: "0",
dateFormat: "dd/mm/yy",
altFormat: "yy-mm-dd",
altField:alt
})
})
})
</script>
The result is good. The date display is well : dd/mm/yy and the date saved is well in the format yyyy-mm-dd when I click on next page, but when I came back I can not recover the date saved .
Do you have a solution ? Or it's possible and easier with your calendar sawtooth ?