Closed dncreative closed 4 years ago
I would prefer not to put an example on the web site because that might imply that using this option was a normal thing to do - it really is not. If you're storing a date in a database then the default ISO format is preferred by any reasonable database backend because it is unambiguous. You might want to apply a different format when you retrieve dates from the database, but that is an entirely different matter.
If you're determined to provide a date in an ambiguous format, you would do something like this:
$('#date-field').datetextentry({ format_date : function(d) { return d.month + '/' + d.day + '/' + d.year; } });
Can you provide an example for format_date? For example, I need to have this stored in the database as MM-DD-YYYY. Thank you.