2

I wonder why the date defaults to mm/dd/yyyy format in the html input type field? It works like this in Chrome, Edge and Firefox.

<input type='date' name='$key' value='$val'><br>

Is there a simple way to change this into dd/mm/yyyy or yyyy/mm/dd, which seems more logical to me?

GKFX
  • 1,386
  • 1
  • 11
  • 30
user2427836
  • 85
  • 10
  • 2
    try to read this: https://stackoverflow.com/questions/7372038/is-there-any-way-to-change-input-type-date-format – John Woo Feb 22 '18 at 09:52
  • You may want to use a text input with a pattern to make the format crossbrowsers – teeyo Feb 22 '18 at 09:58
  • This answer isn't answered... his problem is variable $val which is set to format mm/dd/yyyy. It has nothing to do with date type of input field. @Alive to die – MatejG Feb 22 '18 at 09:59

0 Answers0