I am using datepicker plugin from eyecon.ro and I got selected date with $('input').DatePickerGetDate();.
The output is: Sun Jul 15 2012 00:00:00 GMT+0700 (SE Asia Standard Time)
How to convert it to be Y-m-d format?
I’ve tried these:
$('input').DatePickerGetDate("YY-mm-dd");$('input').DatePickerGetDate("Y-m-d");$('input').DatePickerGetDate("YYYY-mm-dd");
but the result is just the same: Sun Jul 15 2012 00:00:00 GMT+0700 (SE Asia Standard Time)
While initialising the datepicket add format option
and access the data using
Hope this helps..