I have this code currently:
$('#cal').datepicker({
onSelect: function(dateText, inst) {
var dateAsString = dateText; //the first parameter of this function
var dateAsObject = $(this).datepicker( 'getDate' ); //the getDate method
}
});
I wanted to know how I can call parseDate on dateAsObject to format it as such: YYYY/MM/DD. To store into mysql DATE field