How to customize cell template for day view? We have several events for the same time that needs to be displayed. These events are shown as badge in month view for mobile using cellTemplate. How do we achieve this in day view? There is no property to customize the cell template for day view. Please provide examples if possible.
Thank you
You should be able to use the hourSegmentTemplate input for this, it might be tricky implementing your use case though as the hour segment logic is separate from events. Here's a plunker for you that shows how to use the option: http://plnkr.co/edit/R8nb2pmhCGB0TTypkOJV?p=preview Hope that helps! 😄
Thank you. While trying to the use hourSegmentTemplate, I get the error 'Can't bind to 'hourSegmentTemplate' since it isn't a known property of 'mwl-calendar-day-view'. Am I missing something? This is how I am using it
[refresh]="refresh"
[events]="events"
[hourSegments]="4"
[dayStartHour]="8"
[hourSegmentTemplate]="hourSegmentTemplate"
[dayEndHour]="17" >
[class.cal-hour-start]="segment.isStart"
[class.cal-after-hour-start]="!segment.isStart"
[ngClass]="segment.cssClass">
{{ segment.date | calendarDate:'dayViewHour':locale }}
This is some custom content
It was only added in 0.12.0, it sounds like you're on an older version.
Thank you
np, happy to help 😄
Upgraded to "angular-calendar": "0.12.0" to make use of the hourSegmentTemplate. But now the below error message comes
(SystemJS) Unexpected token <↵ SyntaxError: Unexpected token <↵ at eval (
Debugging , found that the error is from js file for animation not getting loaded. @angular/animation is for Angular 4.0 . We are using angular 2.4, how do we handle ?
Thank you
You'll need to upgrade your version of angular to use the latest version of this lib. It should only be a 5 minute job of upgrading the dependencies in package.json and adding the browser animations module.
Hi @sabb123, How did you achieve to alter design for your use case? I also have a scenario where I have many events at same time/hour.
@mattlewis92 can you give me an example of how to customize cell template for month view as i wanted to show the title in the event.
can you give me one example for refreshing the dayStartHour and DayEndHour with dynamic values from api
Can't bind to 'dayEndHour' since it isn't a known property of 'mwl-calendar-month-view',
Can't bind to 'dayEndHour' since it isn't a known property of 'mwl-calendar-month-view'.
I'm facing this issue. How to solve it.
Most helpful comment
You should be able to use the
hourSegmentTemplateinput for this, it might be tricky implementing your use case though as the hour segment logic is separate from events. Here's a plunker for you that shows how to use the option: http://plnkr.co/edit/R8nb2pmhCGB0TTypkOJV?p=preview Hope that helps! 😄