I’m trying to have my Jquery UI Date Picker insert YYYY/MM/DD format (due to SQL limitations). I see the options on the Jquery site, but can’t get it to work. Below is my working code (without Alt Date). It’s in a div that is hidden initially so it needs live():
$(function() {
$('.datepicker').live('focus', function () {
var picker = $(this).datepicker({showOn: ''});
picker.datepicker("show");
});
});
Any help?
You need to add
"option", "dateFormat", "yy/mm/dd"to your datepicker call.This will make datepicker format the date value selected as 2011/08/22.