I found same question or related question on stackoverflow

Is there any way to change input type=“date” format?

I found one simple solution, You can not give particulate Format but you can customize Like this.

HTML Code:

    <body>
<input type="date" id="dt" onchange="mydate1();" hidden/>
<input type="text" id="ndt"  onclick="mydate();" hidden />
<input type="button" Value="Date" onclick="mydate();" />
</body>

CSS Code:

#dt{text-indent: -500px;height:25px; width:200px;}

Javascript Code :

function mydate()
{
  //alert("");
document.getElementById("dt").hidden=false;
document.getElementById("ndt").hidden=true;
}
function mydate1()
{
 d=new Date(document.getElementById("dt").value);
dt=d.getDate();
mn=d.getMonth();
mn++;
yy=d.getFullYear();
document.getElementById("ndt").value=dt+"/"+mn+"/"+yy
document.getElementById("ndt").hidden=false;
document.getElementById("dt").hidden=true;
}

Output:

Answer from ashish bhatt on Stack Overflow
🌐
W3Schools
w3schools.com › jsref › prop_date_value.asp
HTML DOM Input Date value Property
Note: <input type="date"> does not show as a proper date field in IE11, and earlier. Return the value property: inputdateObject.value · Set the value property: inputdateObject.value = YYYY-MM-DD · Get the date of a date field: var x = document.getElementById("myDate").value; Try it Yourself » ·
🌐
W3Schools
w3schools.com › tags › att_input_type_date.asp
HTML input type="date"
<!--> <!DOCTYPE> <a> <abbr> <acronym> <address> <applet> <area> <article> <aside> <audio> <b> <base> <basefont> <bdi> <bdo> <big> <blockquote> <body> <br> <button> <canvas> <caption> <center> <cite> <code> <col> <colgroup> <data> <datalist> <dd> <del> <details> <dfn> <dialog> <dir> <div> <dl> <dt> <em> <embed> <fieldset> <figcaption> <figure> <font> <footer> <form> <frame> <frameset> <h1> - <h6> <head> <header> <hgroup> <hr> <html> <i> <iframe> <img> <input> <ins> <kbd> <label> <legend> <li> <link> <main> <map> <mark> <menu> <meta> <meter> <nav> <noframes> <noscript> <object> <ol> <optgroup> <
🌐
GeeksforGeeks
geeksforgeeks.org › html › how-to-set-input-type-date-in-dd-mm-yyyy-format-using-html
How to Set input type date in dd-mm-yyyy format using HTML? - GeeksforGeeks
Unfortunately, HTML itself doesn't provide a way to directly set the date format to dd-mm-yyyy using the <input type="date"> element.
Published   July 12, 2025
🌐
W3Schools
w3schools.com › js › js_date_formats.asp
W3Schools.com
Independent of input format, JavaScript will (by default) output dates in full text string format: ISO 8601 is the international standard for the representation of dates and times. The ISO 8601 syntax (YYYY-MM-DD) is also the preferred JavaScript date format:
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Reference › Elements › input › date
<input type="date"> - HTML | MDN
<input> elements of type="date" create input fields that let the user enter a date. The appearance of the date picker input UI varies based on the browser and operating system. The value is normalized to the format yyyy-mm-dd.
🌐
Student Tutorial
studentstutorial.com › html › html-input-type-date-set
How to set input type date in dd-mm-yyyy format using HTML
</title> <style> body { text-align: ... dd-mm-yyyy format </h3> <label for="start"> Enter the Date: </label> <input type="date" name="begin" placeholder="dd-mm-yyyy" value="" min="1997-01-01" max="2030-12-31"> </body> </html>...
🌐
W3Schools
www-db.deis.unibo.it › courses › TW › DOCS › w3schools › js › js_date_formats.asp.html
JavaScript Date Formats
JS Examples JS HTML DOM JS HTML Input JS HTML Objects JS HTML Events JS Browser JS Quiz JS Certificate JS Summary ... Wed Mar 25 2015 01:00:00 GMT+0100 (W. Europe Standard Time) ISO 8601 is the international standard for the representation of dates and times. The ISO 8601 syntax (YYYY-MM-DD) is also the preferred JavaScript date format:
🌐
GeeksforGeeks
geeksforgeeks.org › html › how-to-change-input-typedate-format-in-html
How to Change input type="date" Format in HTML ? - GeeksforGeeks
<label for="date">Enter a date (YYYY-MM-DD):</label> <input type="date" name="date" id="date" pattern="\d{4}-\d{2}-\d{2}">
Published   July 23, 2025
Find elsewhere
🌐
W3Schools
w3schools.com › jsref › dom_obj_date.asp
HTML DOM Input Date Object
The Input Date object represents an HTML <input> element with type="date".
🌐
Sololearn
sololearn.com › en › Discuss › 3065275 › how-to-change-html-input-default-date-format-from-mmddyyyy-to-ddmmyyyy
How to change html input default date format from mm/dd/yyyy to dd/mm/yyyy | Sololearn: Learn to code for FREE!
Maybe this helps you https://stackoverflow.com/questions/7372038/is-there-any-way-to-change-input-type-date-format#:~:text=Users can type a date,standards to specify the format.
🌐
DocHub
dochub.com › en › functionalities › input-date-format
Input Date Format For Free securely online | DocHub
input date format yyyy-mm-dd input type date format yyyy-mm-dd w3schools input type=date format change input type date format dd-mm-yyyy stackoverflow date format in html input type date format dd-mm-yyyy javascript input type date format dd-mm-yyyy jquery date format in html w3schools
🌐
TutorialsPoint
tutorialspoint.com › how-to-set-the-input-type-date-in-dd-mm-yyyy-format-using-html
How to set the input type date in dd-mm-yyyy format using HTML?
This article will guide you on various methods to implement date input in the DD-MM-YYYY format utilizing HTML, JavaScript, and external libraries.
🌐
W3Schools
w3schools.com › xml › schema_dtypes_date.asp
XML Schema Date/Time Datatypes
The date data type is used to specify a date. The date is specified in the following form "YYYY-MM-DD" where:
🌐
HTML Form Guide
html.form.guide › html5 › html-input-type-date-format
How to Customize HTML5 Date Field Date Format | HTML Form Guide
Below is a code snippet with the date format altered to the YYYY-MM-DD format. <form> Birthday: <input type="text" name="input" placeholder="YYYY-MM-DD" required pattern="(?:19|20)\[0-9\]{2}-(?:(?:0\[1-9\]|1\[0-2\])-(?:0\[1-9\]|1\[0-9\]|2\[0-9\])|(?:(?!02)(?:0\[1-9\]|1\[0-2\])-(?:30))|(?:(?:0\[13578\]|1\[02\])-31))" title="Enter a date in this format YYYY-MM-DD"/> <input type="submit"> </form>
🌐
SitePoint
sitepoint.com › html & css
Wanted to enforce mm/dd/yyyy date format - HTML & CSS - SitePoint Forums | Web Development & Design Community
December 18, 2023 - If that fails, then you can inform the user that their input is invalid. ... If you are using type="date", then your PHP script should be expecting the date to be in the YYYY-MM-DD format and process it accordingly.
Top answer
1 of 16
830

It is impossible to change the format

We have to differentiate between the over the wire format and the browser's presentation format.

Wire format

The HTML5 date input specification refers to the RFC 3339 specification, which specifies a full-date format equal to: yyyy-mm-dd. See section 5.6 of the RFC 3339 specification for more details.

This format is used by the value HTML attribute and DOM property and is the one used when doing an ordinary form submission.

Presentation format

Browsers are unrestricted in how they present a date input. At the time of writing Chrome, Edge, Firefox, and Opera have date support (see here). They all display a date picker and format the text in the input field.

Desktop devices

For Chrome, Firefox, and Opera, the formatting of the input field's text is based on the browser's language setting. For Edge, it is based on the Windows language setting. Sadly, all web browsers ignore the date formatting configured in the operating system. To me this is very strange behaviour, and something to consider when using this input type. For example, Dutch users that have their operating system or browser language set to en-us will be shown 01/30/2019 instead of the format they are accustomed to: 30-01-2019.

Internet Explorer 9, 10, and 11 display a text input field with the wire format.

Mobile devices

Specifically for Chrome on Android, the formatting is based on the Android display language. I suspect that the same is true for other browsers, though I've not been able to verify this.

2 of 16
192

Since this question was asked quite a few things have happened in the web realm, and one of the most exciting is the landing of web components. Now you can solve this issue elegantly with a custom HTML5 element designed to suit your needs. If you wish to override/change the workings of any html tag just build yours playing with the shadow dom.

The good news is that there’s already a lot of boilerplate available so most likely you won’t need to come up with a solution from scratch. Just check what people are building and get ideas from there.

You can start with a simple (and working) solution like datetime-input for polymer that allows you to use a tag like this one:

 <date-input date="{{date}}" timezone="[[timezone]]"></date-input>

or you can get creative and pop-up complete date-pickers styled as you wish, with the formatting and locales you desire, callbacks, and your long list of options (you’ve got a whole custom API at your disposal!)

Standards-compliant, no hacks.

Double-check the available polyfills, what browsers/versions they support, and if it covers enough % of your user base… It's 2018, so chances are it'll surely cover most of your users.

Hope it helps!

🌐
W3Schools
w3schools.com › jsref › prop_datetime-local_value.asp
HTML DOM Input DatetimeLocal value Property
Note: The <input type="datetime-local"> element does not show any datetime field/calendar in Firefox. Return the value property: datetimelocalObject.value · Set the value property: datetimelocalObject.value = YYYY-MM-DDThh:mm:ss.ms · Get the local date and time of a datetime field: var x = document.getElementById("myLocalDate").value; Try it Yourself » ·
Top answer
1 of 3
6

No such thing. the input type=date will pick up whatever your system default is and show that in the GUI but will always store the value in ISO format (yyyy-mm-dd). Beside be aware that not all browsers support this so it's not a good idea to depend on this input type yet.

If this is a corporate issue, force all the computer to use local regional format (dd-mm-yyyy) and your UI will show it in this format (see wufoo link before after changing your regional settings, you need to reopen the browser).

  • See: http://www.wufoo.com/html5/types/4-date.html for example

  • See: http://caniuse.com/#feat=input-datetime for browser supports

  • See: https://www.w3.org/TR/2011/WD-html-markup-20110525/input.date.html for spec. <- no format attr.

Your best bet is still to use JavaScript based component that will allow you to customize this to whatever you wish.

2 of 3
2

To have a constant date format irrespective of the computer settings, you must use 3 different input elements to capture day, month, and year respectively. However, you need to validate the user input to ensure that you have a valid date as shown bellow

<input id="txtDay" type="text" placeholder="DD" />

<input id="txtMonth" type="text" placeholder="MM" />

<input id="txtYear" type="text" placeholder="YYYY" />
<button id="but" onclick="validateDate()">Validate</button>


  function validateDate() {
    var date = new Date(document.getElementById("txtYear").value, document.getElementById("txtMonth").value, document.getElementById("txtDay").value);

    if (date == "Invalid Date") {
        alert("jnvalid date");

    }
}
🌐
W3Schools
w3schools.com › tags › att_input_type_datetime-local.asp
HTML input type="datetime-local"
<label for="birthdaytime">Birthday (date and time):</label> <input type="datetime-local" id="birthdaytime" name="birthdaytime"> Try it Yourself »