This question already has an answer here:
- html5 time inputs shows 12 hours 6 answers
I created an input time HTML element, with this line:
<input type="time" id="startTime" value="@DateTime.Now.ToString("HH:mm")" />
I am using C# Razor syntax, but it does not really matter.
I checked it in both Google Chrome and Mozilla Firefox and in both time is represented in 24 hour format. Later, when I shared the code with my colleagues, in their versions of Chrome the time is represented in 12-hour format with AM and PM. Is there a way to specify in my HTML code that time should be represented in one way in all browsers.
Thank you!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire