Force the use of a 24-hour time input type regardless of system locale
P粉189606269
P粉189606269 2023-08-18 12:27:18
0
1
418

I'm developing a small Angular application and I'm using the following HTML element when the user sets a start time:



I noticed that this element works in 12-hour or 24-hour time depending on the user's system locale. Is there a way to always force a 24-hour clock, regardless of the system locale?

Alternatively, are there any JavaScript solutions available?

P粉189606269
P粉189606269

reply all (1)
P粉343141633

No, and (according toMDN):

This is even less strict.

If your user interface requirements differ from those provided by the browser, then you must implement (or find) a custom input that meets those requirements, includingvalidatingthe user input.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!