Open uniquexor opened 8 years ago
I changed datepicker widget on other working one. https://github.com/comdvas/bootstrap-editable-datetimepicker/blob/master/bootstrap-editable-datetimepicker.js Just set 'datetime2' as type parameter.
@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 You can replace datetimepicker widget by this one, that gives me more confidence: https://github.com/Eonasdan/bootstrap-datetimepicker And use my wrapper from above message. I did not try to update current widget vendor files, maybe this bug was fixed already.
I did not try to update current widget vendor files, maybe this bug was fixed already.
@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, I have just created a fork of this one and added one new branch: https://github.com/gb5256/yii2-editable-widget/tree/bugfix-vendor-files There I have updated the vendor files for timepicker to the latest version over at https://github.com/uxsolutions/bootstrap-datepicker
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: https://github.com/uxsolutions/bootstrap-datepicker/issues/1368 So I guess we should check to replace the source with something different.
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.js is 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.