0
<label >Select a time:</label>
<input type="time" >

I used the HTML's default Time field to get the time from the user

The time field format depended on the local machine's regional format

Check the below images to get more clearly

format with 09:40

format with 9:40 AM

But I always need time handle with AM/PM

How should I prevent the Time field from the local regional format?

Sathish M
  • 19
  • 1
  • 2
    The `input[type="time"]` depends on the regional formatting so there is no way you to instruct it to always have `12 Hours` format. Using a `Time Picker` library might be a good alternative. – ThS Sep 10 '22 at 11:01
  • Does this answer your question? [HTML input time in 24 format](https://stackoverflow.com/questions/32609407/html-input-time-in-24-format) – gre_gor Sep 10 '22 at 11:06
  • **there is no way to parameterize an `input[type=time]`. this one is calibrated to use its host system characteristics (time zone / language) to produce an according UTC** – Mister Jojo Sep 10 '22 at 11:23

0 Answers0