problem changing datepicker's date format of
I am having difficulty trying to change the format of selected date from date picker. This is a test so my code is very simple. Here it is.
$("#datepicker").datepick({
onSelect: function(dates) {
alert('date picked is ' + dates);
var f = $.datepick.formatDate("mm-dd-yyyy",dates);
alert(f);
}
});
I have also tried setting the dateformat property but that doesn't work either.
$("#datepicker").datepick({
dateFormat: "mm-dd-yyyy",
onSelect: function(dates) {
alert('date picked is ' + dates);
}
});
It display the date as Fri Mar 18 2011 12:00:00 GMT-0700 (US Mountain Standard Time).
Thanks.
alex