Copy link to clipboard
Copied
I am creating some html forms where the data being input by the users will be send via email, I have a field where the user selects the date from a calendar once the form is submitted the date displays as YYYY-MM-DD, How can I change the format to display as MM-DD-YYYY? I am using Dreamweaver 21.3 build 15593.
Copy link to clipboard
Copied
Which datepicker are you using? It should contain parameters for setting the required date format that's automatically entered when user selects a date.
For manual insertions, use HTML5 pattern for mm/dd/yyyy. See below for more details.
https://www.html5pattern.com/Dates
Copy link to clipboard
Copied
When they select the date it display correctly but when the recipient receives the email it display as YYYY-MM-DD
Copy link to clipboard
Copied
The answer to that is in your form processing script. Input data is formatted by the script prior to data transfer.
Copy link to clipboard
Copied
I should add that if form data is being ported into a database, the date format must be compatible with whatever your database requires. If unsure, ask your backend developers.