How to change the display format of the input type='datetime-local' in HTML5?

Viewed 781

I have implemented a an input of type datetime-local which works well.

The problem is that most of the users of the app use the format dd/mm/yyyy --:-- -- while datetime-local displays the date in the format mm/dd/yyyy --:-- -- which is causing more confusion than improving on the ease of use of the app.

I have tried to research and the only straight forward answer was a comment stating 'It's impossible'

The only solution which works is to remove the type datetime-local and use a third party library or the pattern attribute of the input tag.

Even though this approach works was still hoping that the format for input of type datetime-local can be changed.

0 Answers
Related