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

Week view doesn't render properly when dayEndHour=24 #907

Closed
JorgeSolFerreira opened this issue Mar 1, 2019 · 2 comments
Closed

Week view doesn't render properly when dayEndHour=24 #907

JorgeSolFerreira opened this issue Mar 1, 2019 · 2 comments

Comments

@JorgeSolFerreira
Copy link

JorgeSolFerreira commented Mar 1, 2019

Describe the bug

When setting the dayEndHour property of the calendar week view to 24, events that start at the beginning of the day don't render properly.

Minimal reproduction of the problem with instructions

https://stackblitz.com/edit/angular-b6tryr

Versions

  • @angular/core: 7.2.7
  • angular-calendar: 0.26.6
  • Browser name and version: Chrome 72.0.3626.119
@JorgeSolFerreira
Copy link
Author

When the dayEndHour > 23 or the dayStartHour < 0 the events render to the next or the previous day. If this isn't an intended behaviour the calendar should limit the day hour range.

@mattlewis92
Copy link
Owner

It is mentioned in the docs that the value must be 0-23 (as 24:00 is 00:00 the next day). I guess instead of failing weirdly, I can change the behaviour to do Math.max(Math.min(23, dayStartHour), 0) which would probably help avoid errors like this.

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

No branches or pull requests

2 participants