I have this bootstrap datepicker component
<div class="col-md-2">
<input id="dataSolicitacao" type="text" name="timepicker" class="b-datepicker form-control form-white" placeholder="Informe a data" data-orientation="top">
</div>
I put these javascripts
<script>
$(document).ready(function () {
$('#dataSolicitacao').datepicker({
format: "DD/MM/yyyy",
language: "pt-BR",
minViewMode: 0;
orientation: auto
});
});
</script>
Or this
<script type="text/javascript">
$(function() {
$('#dataSolicitacao').datetimepicker({
language: 'pt-BR'
});
});
</script>
The fact is that none of them worked. The latter, worse, because it opens another calendar underneath with option of time, and it does not close when choosing the date and clicking outside. Without also does not close when choosing the date, but when clicking outside the calendar, it closes.
How do I change the date format for Brazilian Portuguese (dd / mm / yyyy)?