mattlewis92 / angular-calendar

A flexible calendar component for angular 15.0+ that can display events on a month, week or day view.
https://mattlewis92.github.io/angular-calendar/
MIT License
2.73k stars 868 forks source link

allDayEventsLabelTemplate not working as expected #1533

Open FrankL-git opened 2 years ago

FrankL-git commented 2 years ago

Describe the bug

I used the kitchen sink example of your demos and tried to create an own allDayEventsLabelTemplate for the CalendarWeekViewComponent. This does not work because the original template where the ngTemplateOutlet directive is onto is displayed, too.

Minimal reproduction of the problem with instructions

Here is the link to the template.html in stackblitz (you will find the template "myAllDayEventsLabelTemplate" I created from line 93 to 96 https://stackblitz.com/edit/angular-hud5wq?file=demo/template.html Here the link to the running application https://angular-hud5wq.stackblitz.io

I think the reason is, that the ngTemplateOutlet is used onto a div instead of a ng-container.

Screenshots

Versions

matts-bot[bot] commented 2 years ago

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 sponsoring me

FrankL-git commented 2 years ago

As a workaround I hided the original template via css (very ugly):

.cal-all-day-events > .cal-day-columns > .cal-time-label-column:nth-child(1){ display: none; }