change date format before adding to database
I am using the datepicker component and using the following format dd-mm-yy because it's more intuitive for the user. Before I add the value to the data though I believe I need to adjust the date to yyyy-mm-dd
I think I can use this code to do that?
return $.datepicker.formatDate( "yyyy-mm-dd", $.datepicker.parse( "dd-mm-yyyy", value_str) );
but I can't figure out how to just alert me what the new date is so I can check in the test mode.