I using timepicker in my project but I need this time in 24 hour without am,pm this is my code
<div class="bootstrap-timepicker" >
<label for="email" class="col-sm-2 control-label">From Time</label>
<input type="text" id="from_time" class="form-control timepicker" style="width: 30%;" >
<label for="email" class="col-sm-2 control-label">To Time</label>
<input type="text" id="to_time" class="form-control timepicker" style="width: 30%;" >
<!-- /.input group -->
</div>
but this code give me 12 hour format like this
04:00 PM
but what I want
16:00
if you are using jquery timepicker
$('input.timepicker').timepicker({
timeFormat: 'HH:mm:ss',
});
if you are using bootstrap timepicker
$(function () {
$('#datetimepicker4').datetimepicker({
pickDate: false,
minuteStepping:30,
format: 'hh:mm',
pickTime: true,
defaultDate: new Date(1979, 0, 1, 8, 0, 0, 0),
language:'en',
use24hours: true
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With