Calendar datepicker bootstrap with error in year bisexto

1

I'm using% bootstrap%, and I've noticed that the 2016 calendar is wrong. Today for example is 01/07/2016 Friday and the calendar is displaying as if it were Saturday.

Cananyonetellmeifthereisasolutiontothisproblem?

Javascript

$('#data_venda').datepicker({language:'pt-br'});

translation

;(function($){$.fn.datepicker.dates['pt-BR']={days:["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"],
        daysShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"],
        daysMin: ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa"],
        months: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"],
        monthsShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"],
        today: "Hoje",
        monthsTitle: "Meses",
        clear: "Limpar",
        format: "dd/mm/yyyy"
    };
}(jQuery));
    
asked by anonymous 01.07.2016 / 21:53

1 answer

2

After several tests it was identified that the problem was in the translation of the calendar causing it to start counting on Monday. What was done to resolve:

In the translation line where it is specified:

$.fn.datepicker.dates['pt-BR']

I changed to $.fn.datepicker.dates['pt-br']

For some reason that I do not know when I put the br in the box, I was translating but counting the wrong days. After putting br tiny it started to display the calendar correctly as in the image below:

Sothetranslationlookslikethis:

;(function($){$.fn.datepicker.dates['pt-br']={days:["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"],
        daysShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"],
        daysMin: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"],
        months: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"],
        monthsShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"],
        today: "Hoje",
        monthsTitle: "Meses",
        clear: "Limpar",
        format: "dd/mm/yyyy"
    };
}(jQuery));
    
04.07.2016 / 14:22