In my calendar I need to display the time of day and week as follows: 09:00, 09:15, 09:20.
I upgraded the package to the latest
angular-calendar version
0.26.1
and now the code below is giving error and I can no longer display the time as before.
module.ts:
class CustomDateFormatter extends CalendarNativeDateFormatter {
public dayViewHour({ date, locale }: DateFormatterParams): string {
return new Intl.DateTimeFormat('ca', {
hour: 'numeric',
minute: 'numeric'
}).format(date);
}
}
// It does not work any more this way and error occurs ...
CalendarModule.forRoot({
dateFormatter: {
provide: CalendarDateFormatter,
useClass: CustomDateFormatter
}
}),
component.scss:
.cal-day-view .cal-hour-segment.cal-after-hour-start .cal-time {
display: block;
}
I looked in the documentation I searched elsewhere but could not find what I need ...