Is there any way to change input type date format

0 votes

I'm working with HTML5 elements on my webpage. By default input type="date" shows date as YYYY-MM-DD. The question I have in my mind is if it is possible to change its format to something like: DD-MM-YYYY?

Feb 18 in Others by Rahul
• 8,980 points

1 answer to this question.

0 votes
To answer your question, it is impossible to change the format and all we have to do is to differentiate between the over the wire format and the browser's presentation format. The HTML5 date input specifies a full-date format equal to: yyyy-mm-dd. This format is used by the value HTML attribute and DOM property and is the one used when doing an ordinary form submission. Whereas, for the presentation format, the browsers are unrestricted in how they present a date input. At the time of writing Chrome, Edge, Firefox, and Opera have date support. They all display a date picker and format the text in the input field.
answered Feb 18 by Aditya
• 7,280 points

Related Questions In Others

0 votes
1 answer

Change date format of cell in excel from to yyy/mm/dd ( excel version 2013 )

Hello :)   Excel’s Format Cells function can quickly ...READ MORE

answered Feb 9 in Others by gaurav
• 13,460 points
0 votes
1 answer
+4 votes
0 answers

What is the best way to pass CISSP Exam In first attempt?

Is CISSP Certification Worth. And What is ...READ MORE

Jun 25, 2019 in Others by Eric
• 310 points
0 votes
1 answer
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
0 votes
1 answer

Using/Handling colon inside a JSF generated HTML element ID in CSS selector

Yes, you can.  Just Backslash (\) the colon.  Like ...READ MORE

answered Nov 14, 2018 in Others by DataKing99
• 8,240 points
0 votes
1 answer

What is a css selector and where is it used?

CSS Selector is a combination of element ...READ MORE

answered Nov 21, 2018 in Data Analytics by Kalgi
• 52,350 points
0 votes
1 answer

What is the difference between span and div?

The div should be used to wrap sections of ...READ MORE

answered Jan 16, 2020 in Web Development by Niraj

edited Jan 21, 2020 by Niroj 2,246 views
0 votes
1 answer

Convert a date format in PHP

Use strtotime() and date(): $originalDate = "2010-03-21"; $newDate ...READ MORE

answered Feb 17 in Others by Aditya
• 7,280 points
Send OTP
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP