diff --git a/package-lock.json b/package-lock.json index bbf8658f..074c1216 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "@ngx-translate/http-loader": "8.0.0", "@popperjs/core": "2.11.8", "bootstrap": "5.3.3", - "date-fns": "3.6.0", + "date-fns": "4.1.0", "fp-ts": "2.16.9", "io-ts": "2.2.21", "io-ts-types": "0.5.19", @@ -7610,9 +7610,9 @@ } }, "node_modules/date-fns": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz", - "integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz", + "integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==", "funding": { "type": "github", "url": "https://github.com/sponsors/kossnocorp" diff --git a/package.json b/package.json index 7ca19b40..340b69dd 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "@ngx-translate/http-loader": "8.0.0", "@popperjs/core": "2.11.8", "bootstrap": "5.3.3", - "date-fns": "3.6.0", + "date-fns": "4.1.0", "fp-ts": "2.16.9", "io-ts": "2.2.21", "io-ts-types": "0.5.19", diff --git a/src/app/presence-control/services/presence-control-state.service.ts b/src/app/presence-control/services/presence-control-state.service.ts index bc569574..f75804a0 100644 --- a/src/app/presence-control/services/presence-control-state.service.ts +++ b/src/app/presence-control/services/presence-control-state.service.ts @@ -68,9 +68,10 @@ export class PresenceControlStateService confirmBackLinkParams?: Params; private selectedDateSubject$ = new BehaviorSubject(new Date()); - selectedDate$ = this.selectedDateSubject$ - .asObservable() - .pipe(map(startOfDay), distinctUntilChanged(isEqual)); + selectedDate$ = this.selectedDateSubject$.asObservable().pipe( + map((date) => startOfDay(date)), + distinctUntilChanged(isEqual), + ); private viewModeSubject$ = new Subject(); viewMode$ = merge(