angularkendo-ui

how to change date format of a cell inside kendo-scheduler-month-view using angular


how to change date format of a cell inside

i want date format to be displayed as 01 Oct currently what i have is the on the screenshot below.

enter image description here

i tried the code below but seems to be not working. the error says 'Can't bind to 'cellTemplate' since it isn't a known property of 'kendo-scheduler-month-view''

<kendo-scheduler-month-view [eventHeight]="18" [eventClass]="getEventClass" [cellTemplate]="monthCellTemplate">
  <ng-template kendoSchedulerEventTemplate let-event="event" let-resources="resources" let-date="date">
    <ng-template *ngTemplateOutlet="eventTemplate; context: { $implicit: event.dataItem }"></ng-template>
  </ng-template>
</kendo-scheduler-month-view>

<ng-template #monthCellTemplate let-date="date">
  {{ date | date: 'dd/MM' }}
</ng-template>

Solution

  • You can set the template for the month slot:

      <kendo-scheduler-month-view>
        <ng-template kendoSchedulerMonthDaySlotTemplate let-date="date">
          <strong>{{ date | date : "dd/MM" }}</strong>
        </ng-template>
      </kendo-scheduler-month-view>
    

    Example