Skip to content
This repository was archived by the owner on Jul 27, 2023. It is now read-only.
This repository was archived by the owner on Jul 27, 2023. It is now read-only.

Datepicker sets wrong date #27

@uniquexor

Description

@uniquexor

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions