You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've verified that I'm running react-big-schedule latest version.
Describe the bug
When using german locale ('de'), the weekends are incorrectly calculated and highlighted.
That's because in germany the first day of the week is monday, not sunday.
Imho, this bug could be rather easy fixed by a slight adjustment of the function isNonWorkingTime in behaviors.js:
Instead of using .weekday(), use .day(), since that is not locale dependent and will always return mondays as 1.
Checklist
Describe the bug
When using german locale ('de'), the weekends are incorrectly calculated and highlighted.
That's because in germany the first day of the week is monday, not sunday.
Reproduction Link/Code
Steps to reproduce
Operating System
Windows
Browser
Firefox
React version
18.3.1
react-big-schedule version
4.4.1
Additional Information
Imho, this bug could be rather easy fixed by a slight adjustment of the function
isNonWorkingTime
inbehaviors.js
:Instead of using
.weekday()
, use.day()
, since that is not locale dependent and will always return mondays as 1.The text was updated successfully, but these errors were encountered: