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.72k stars 866 forks source link

More control over segment creation #1710

Closed angelaki closed 5 months ago

angelaki commented 5 months ago

Right now I'm using this (wonderful!) calendar control (among others) to display (off-) peak times. Luckily this can be easily done with the templating system, but: right now I need to call a function the hourSegmentTemplate that gets called pretty often ([class.cal-side-time]="!isWorkingHour(segment.date,group)").

How about more control or maybe a meta object (like the events have) for the segment object (https://github.com/mattlewis92/angular-calendar/blob/4b34012ae4125ef68b4049284186dc966b2413bf/projects/angular-calendar/src/modules/week/calendar-week-view/calendar-week-view.component.ts#L1202)?

Right now I "mock" this a bit by just setting properties in the function, if the value is not present. That's ok, but a bit ... you know ... ugly.

Plus the method gets called pretty, pretty often on D'n'D (what makes it quite slow). Maybe rework it, so the slots won't get recreated but just the events?

If you're interested, I could provide a PR :)

matts-bot[bot] commented 5 months ago

This issue has been closed automatically as it did not follow the issue template, please open a new issue that follows the bug report or feature request template.

Thank you! ✌️