How to change format from 12hrs to 24 hrs in html5 datetime picker?

怎甘沉沦 提交于 2019-12-24 00:29:02

问题


I am using datetime picker from Html5.

      <input id="datetime"  type="datetime-local">

But It is containing 12 Hrs time with A.M or P.M, But I want to set 24 hrs place of A.M, P.M.

I am refering this link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local

My problem is only I want to set 24 hrs in time.


回答1:


You can use input type="time" but It depends on the time format of the user's operating system when the web browser was launched. You can change your OS time format and restart your browser to check.

This doesn't support all browser, if you are working with bootstrap is better to use http://jdewit.github.io/bootstrap-timepicker/



来源:https://stackoverflow.com/questions/48880956/how-to-change-format-from-12hrs-to-24-hrs-in-html5-datetime-picker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!