-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong Weekdays #150
Comments
Hi 👋 @PhilippLeh Thank you for your feedback. Can you show us your code so that we can reproduce this problem. |
Implementation
package.json
Just to mention as in my last issue, I'm using a monorepo. |
@PhilippLeh I have just published a new version. Can you try it and close this exit if it's ok. |
@onesine I'm sorry, but that didn't change anything. |
@onesine I just pulled the repo and replaced the usage in my code, to debug this issue and thats what I found: The previous days were empty, because I got the first day in the month in the wrong format. To get the full name of the weekdays I had to change the format from
to
Furthermore dayjs somehow returned the weekdays already in the right language (in my case german), so I also had to translate the getNumberOfDay mapping like so:
It definitely has something to do with my repo as no one else faces this issue. Maybe its because of some dayjs config/usage outside the datepicker, but I have not figured out yet why this happens, it now works for me. |
I'm sorry I couldn't find a solution for you. This is a very peculiar situation. I'm going to keep looking into the problem, though. |
No worries, thanks a lot for your effort! |
I, too, encountered this bug, and found the reason for this after thoroughly looking at the codebase. Apparently if you declare dayjs.locale() somewhere alongside using this library,
because the date argument provided using I'm implementing a fix, and will update with a pull request. |
The Datepicker shows the wrong weekday, or do I miss something?
The text was updated successfully, but these errors were encountered: