-
Notifications
You must be signed in to change notification settings - Fork 20
Datepicker sets wrong date #27
Comments
I changed datepicker widget on other working one. |
@comdvas @uniquexor very sorry for being unresponsive. I believe we simply need to update the vendor files. I am looking towards fixing the issue, maybe you guys can help. |
@tonydspaniard |
@comdvas Thank you very much for your suggestion, will try to test it as soon as possible. This library needs anyway an update. If you have time for a PR or tried the new update and is working let us know. Thanks! |
Any news on this one? It looks like this error is still happening and makes the datepicker pretty useless... |
@gb5256 will try to fix it during the week. |
Hello, But the bad news is that it makes no difference for this problem. UTC dates are still used and therefore creating an offset with the local date picked. I then googled a bit around, and it seems to be a common problem with this library. Like discussed here: |
I've noticed that when I use datepicker widget, it set's a wrong date. For example, if I choose 2016-02-04 it would set 2016-02-03 in stead.
After digging around a bit, I found out that the method
formatDate
in file /assets/datepicker/vendor/js/bootstrap-datepicker.jsis to blame. If I change it to use date.getDay() in stead of date.getUTCDay(), everything works perfectly.
I suppose it has got something to do with the fact that I live in UTC +2h timezone.
The text was updated successfully, but these errors were encountered: