Skip to content

fix: use $index tracking in @for loops to prevent DST duplicate key e…#1795

Open
devchuckcamp wants to merge 1 commit intomattlewis92:mainfrom
devchuckcamp:fix/dst-duplicate-track-keys
Open

fix: use $index tracking in @for loops to prevent DST duplicate key e…#1795
devchuckcamp wants to merge 1 commit intomattlewis92:mainfrom
devchuckcamp:fix/dst-duplicate-track-keys

Conversation

@devchuckcamp
Copy link

During DST transitions, two consecutive local hours can map to the same UTC timestamp (e.g. 2 AM CET and 3 AM CEST both become 2024-03-31T01:00:00.000Z). The @for track expressions used .toISOString() which converts to UTC, causing NG0955 when daysInWeek spans a DST boundary.

Replace all .toISOString() track expressions in the week view with $index. This is safe because views are fully recomputed on every input change.

Fixes #1793

…rrors

During DST transitions, two consecutive local hours can map to the
same UTC timestamp (e.g. 2 AM CET and 3 AM CEST both become
2024-03-31T01:00:00.000Z). The @for track expressions used
.toISOString() which converts to UTC, causing NG0955 when
daysInWeek spans a DST boundary.

Replace all .toISOString() track expressions in the week view
with $index. This is safe because views are fully recomputed on
every input change.

Fixes mattlewis92#1793
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Angular 20 Track @for duplicated keys

1 participant