Is there available a component, a div class, anything which uses pure JS or bootstrap in order to display a date string which formats as per instructions? For example:
<div
class="my-datetime-formatter-and-display-er"
value="Thu 30 Apr 20:12:08 EEST 2020"
format="%M/%Y"
></div>
and display "04-2020"? But for the same value
, when format changes it displays something else? The idea is that the value
is the same all the time.
All I get in my searches are date-pickers.
Alternatively, if I already have a js function which formats a datestr, e.g. formatdata("Thu 30 Apr 20:12:08 EEST 2020", "%M/%Y")
, how can I call it on a div
onload(?) to format the value and fill it in at creation time? (provided that it does not interfere with already installed onclick
etc.)