I'm trying to display in PM format, but whenever I select at timepicker it arrows as AM.
$('.datetimepicker').datetimepicker({
lang: 'pt-BR',
timepicker: true,
format: 'd/m/Y h:i'
});
WhenIselectthetime,example21:00itarrowsas09:00:
Simple, you are informing in the hour format the h
in small, and that in order to work in 24hs mode you must inform it in uppercase H
.
jQuery.datetimepicker.setLocale('pt-BR');
$('#datetimepicker').datetimepicker({
timepicker: true,
format: 'd/m/Y H:i'
});
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.4/jquery.datetimepicker.min.css">
<input id="datetimepicker" type="text" >
<script src="https://code.jquery.com/jquery-2.2.4.js"></script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.4/build/jquery.datetimepicker.full.js"></script>
You can check out the documentation , among other examples.