-
-
Notifications
You must be signed in to change notification settings - Fork 870
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
[excludeDays] doesn't work correctly in the week view component #973
Comments
Thanks so much for opening an issue! If you'd like me to give priority to answering your issue or would just like to support this project, then please consider supporting me on Patreon |
Thanks for reporting, I can reproduce this issue. Would happily accept a PR to fix this, the issue lies somewhere in the |
On a related note, if you specify excludedDays e.g. to be |
@evilstiefel it's probably related to this bug, I'll make sure to include a test case for that when I get round to fixing it. As a workaround you can set |
From a quick check, it seems that the calendar-utils function for getWeekView() is initialized with wrong values for these instances.
viewStart = (viewStart <= viewDate) ? viewStart : viewDate;
viewStart = startOfDay(viewStart) The calls from angular-calendar to that function don't even seem to include values for viewStart and viewEnd, so the initializer-values are assigned (as far as I can tell, only glanced over it briefly). EDIT: |
Finally managed to fix this one, please give |
Describe the bug
When using some combinations of days to be excluded, some days that shouldn't be excluded are excluded anyway, for example, setting [excludeDays]="[4, 6]", friday (day 5) is also excluded in the week view (even though it works fine in the month view).
Seems like the combinations of days "0, 2" and "4, 6" are the problematic ones for me, but I'm not sure if there's others combinations with issues as well.
Including a screenshot using [excludeDays]="[4, 6]", in both month and week views (friday is missing in the week view). The screenshot was taken in a new project:
Minimal reproduction of the problem with instructions
Screenshots
Versions
@angular/core
: 7.2.0angular-calendar
: 0.27.7Firefox 66.0.4, Google Chrome 74.0.3729.131, Microsoft Edge 44.17763.1.0
The text was updated successfully, but these errors were encountered: