yassin
yassin

Reputation: 81

Datetime local 24h format

i want to use the the 24 hour format in my datetime picker im my view here the code of my view i am using the simple datetime local

<input id="start_date" type="datetime-local" class="form-control>

the result: here's the result

i tried this

<script type="text/javascript">
  $('#clockPicker').timepicker({
      'timeFormat':'H:i'
  });
</script>

Upvotes: 6

Views: 26660

Answers (1)

Roy
Roy

Reputation: 104

Referring to Mozilla reference, it is NOT possible to choose the date format.

If you want to use 24H format, you can change your system preferences. The date format is based on your system preferences.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time#:~:text=The%20value%20of%20the%20time%20input%20is%20always%20in%2024,always%20hh%3Amm%3Ass%20.

Upvotes: 4

Related Questions