How to change date time format in HTML5?


The date-time format can be changed by using custom HTML5 elements. If we wish to change or override existing Html tags then we can do so with the help of shadow DOM.

We can make customizable tags like −

<date-timeformatchange ></ date-timeformatchange>

Here is an example −

<date-timeformatchange format=”dd/mm/yyyy ></ date-timeformatchange>

However, E10 and older versions do not support customizable tags; however, all newer versions support customizable tags.

karthikeya Boyini
karthikeya Boyini

I love programming (: That's all I know

Updated on: 24-Jun-2020

3K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements