How to customize date format in HTML date input tag?
P粉709644700
2023-08-21 14:15:32
<p>I would like to know if it is possible to set the date format in the <code><input type="date"></input></code> tag in html... currently it is yyyy-mm -dd format, and what I need is dd-mm-yyyy format. </p>
I found the same question or related question on stackoverflow
I found a simple solution, you can't give a specific format, but you can customize it as follows.
HTML code:
CSS code:
Javascript code:
Output: