Skip to main content
Jaime I Escobar
Participant
Dec 14, 2022 8:44 PM UTC
Question

Insert > Form > Date, How to change the format?

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.

    This topic is closed to new replies. Start a new post to keep the conversation going.

    4 replies

    Nancy OShea
    Community Expert
    Community Expert
    Dec 14, 2022 9:09 PM UTC

    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

     

    Translate
    Nancy O'Shea— Product User & Community Expert
    Jaime I Escobar
    Participant
    Dec 14, 2022 9:29 PM UTC

    When they select the date it display correctly but when the recipient receives the email it display as YYYY-MM-DD

    Translate
    Nancy OShea
    Community Expert
    Community Expert
    Dec 14, 2022 9:44 PM UTC

    The answer to that is in your form processing script.  Input data is formatted by the script prior to data transfer.

     

    Translate
    Nancy O'Shea— Product User & Community Expert