Skip to content
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

Incorrect day numbers in month view #173

Closed
dcrawshay opened this issue Apr 5, 2017 · 6 comments
Closed

Incorrect day numbers in month view #173

dcrawshay opened this issue Apr 5, 2017 · 6 comments
Labels

Comments

@dcrawshay
Copy link

Bug description / Feature request:

Some months have duplicate days:
March 1997, for example, day "9" repeats itself and the following day numbers are in the wrong place (offset by the extra "9" day). (see plunkr)

For bugs only, a link to minimally working plunker that reproduces the issue (you can fork a starter from any of the demos)

http://plnkr.co/edit/fFbxmsdCpMva1BON92CU?p=preview

Versions

Angular: 4.0.1

Calendar library: 0.12.0

Browser name and version:
Safari 10.0.3 (on macOS 10.11.6)
Chrome 57.0.2987.133 (on Windows 7)

@mattlewis92
Copy link
Owner

I can't reproduce this, it looks ok to me?

screen shot 2017-04-05 at 17 00 54

@dcrawshay
Copy link
Author

Try Safari on macOS, or Chrome on Windows: (Chrome on macOS is working)

screen shot 2017-04-05 at 11 15 34 am

@mattlewis92
Copy link
Owner

It works fine for me in safari on mac as well, what timezone are you in? Perhaps it's an issue with your particular timezone. Weird how it works in chrome on macos and not windows as they use the same code under the hood

@dcrawshay
Copy link
Author

Central Time (CT) UTC-06:00

@mattlewis92
Copy link
Owner

I think the issue is related to this: date-fns/date-fns#376, sadly there's not much I can do to resolve it until the date-fns lib adds support for UTC date operations.

@mattlewis92
Copy link
Owner

TIL you can simulate a timezone in unit tests by simply doing TZ=America/Chicago npm test, although even with doing that I couldn't reproduce this issue, as the dates are still different (although you can observe that DST is kicking in here by the timezone changing so it's probably that which is causing the issue).

Object{date: Sun Mar 09 1997 00:00:00 GMT-0600 (CST), isPast: true, isToday: false, isFuture: false, isWeekend: true, inMonth: true, events: [], badgeTotal: 0} 
Object{date: Mon Mar 10 1997 00:00:00 GMT-0500 (CDT), isPast: true, isToday: false, isFuture: false, isWeekend: false, inMonth: true, events: [], badgeTotal: 0}

I've slightly changed the logic that generates the month view which might fix the issue, please give 0.13.1 a go 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants