Skip to content

Angular 20 Track @for duplicated keys #1793

@vladys-22

Description

@vladys-22

Describe the bug

When set a large number of days in week view it has a duplicate keys error.

Error
NG0955: The provided track expression resulted in duplicated keys for a given collection. Adjust the tracking expression such that it uniquely identifies all the items in the collection. Duplicated keys were:
key "2024-03-31T01:00:00.000Z" at index "2" and "3". Find more at https://v20.angular.dev/errors/NG0955

Minimal reproduction of the problem with instructions

Html
<mwl-calendar-week-view [viewDate]="viewDate" [daysInWeek]="days" [events]="events" [locale]="locale">

Typescript
readonly CalendarView = CalendarView;
readonly locale = 'es-ES';
view: CalendarView = CalendarView.Week;
viewDate = new Date('2024-01-01');
events: CalendarEvent[] = [];
days = 140;
loading = true;

Screenshots

No response

@angular/core version

20.1.3

angular-calendar version

0.32.0

Browser name and version

Chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions