New to Kendo UI for Angular? Start a free 30-day trial
WeekNumberCellTemplateDirective
A directive for customizing the week number cells in the Calendar component.
This directive allows you to define a custom template for rendering the content of week number cells in the month view when the weekNumber property is enabled. The template context provides access to the current date and cell context information.
Template Context Variables:
date
- The Date object representing the current week's datecellContext
- Additional context information about the current week number cell
For more examples, refer to the article on templates.
html
<kendo-calendar [weekNumber]="true">
<ng-template kendoCalendarWeekNumberCellTemplate let-context="cellContext">
<span class="custom">W{{context.formattedValue}}</span>
</ng-template>
</kendo-calendar>
Selector
[kendoCalendarWeekNumberCellTemplate]