Using <input type="date"/>
, <input type="datetime-local"/>
or <input type="time"/>
will display date and time as either:
date: dd/mm/yyyy
datetime: dd/mm/yyyy, hh:mm:ss
time: hh:mm:ss
However, in my language, /
is not used as the date separator, instead .
is used. .
is also the preferred separator for time (although :
is accepted), so I would like these inputs to show up as:
date: dd.mm.yyyy
datetime: dd.mm.yyyy at hh.mm.ss
time: hh.mm.ss
Can this be done natively with these HTML input types, or does this have to be implemented with custom inputs?
A solution should be locale-dependent (so .
shouldn't be a hardcoded separator), and in pure HTML. A negative answer is also accepted if browsers currently do not support this.
From 4.10.7.1.12 Local Date and Time state:
The format shown to the user is independent of the format used for form submission. Browsers are encouraged to use user interfaces that present dates and times according to the conventions of the user's preferred locale.