4
I had this problem recently. To fix it I edited an excerpt of the bootstrap-datepicker Fill method that used to be like this:
var prevMonth = new Date(year, month - 1, 28, 0, 0, 0, 0),
day = DPGlobal.getDaysInMonth(prevMonth.getFullYear(), prevMonth.getMonth());
And then it was like this:
var prevMonth = new Date(year, month - 1, 28, 12, 0, 0, 0),
day = DPGlobal.getDaysInMonth(prevMonth.getFullYear(), prevMonth.getMonth());
And the parseDate method, where it was:
date.setHours(0);
Became:
date.setHours(12);
Welcome to Stackoverflow in English, aka Sopt. I edited your question to remove the English part (we do not write in English to explain the problem), also withdrew your greeting, because as people read at different times it loses its meaning, our focus is always on questions and answers, it may seem rude of me, but it’s a convention we have here :)
– RodrigoBorth
Take a look here: https://github.com/eternicode/bootstrap-datepicker Have a link to an online demo, try to reproduce the problem you are having in your application, if it happens you can open an Issue.
– leonardo
Arthur, what version of the datepicker are you using?
– Sergio
Does it give any error? In my simply does not work, no error in the console....
– Kayan Almeida