Open nehay578 opened 7 years ago
However, the date is correct in the picker in the live demos here: https://www.npmjs.com/package/angularjs-datetime-picker
This seems related to US “start weeks with Sunday” vs. Europe “start weeks with Monday”. Anyone know of a fix? @nehay578
This is kind of a critical bug...anyone looked at it?
I did some investigation, https://github.com/angular/angular.js/issues/11900, problem is that angular and javascript disagree on which day is 0. JavaScript Sunday=0, Angular $locale says Monday=0. So...if you change line 160 like this it fixes the problem:
firstDayOfWeek = ($locale.DATETIME_FORMATS.FIRSTDAYOFWEEK+1)%7 || 0;
+1
As seen in the screenshot, today's date is 25th Sep, which is Monday, but the datetime picker shows 25th Sep under tuesday.