From a5c09d11f0abc43760f68fd1ac42a953ca002ead Mon Sep 17 00:00:00 2001 From: Fenris Wolf Date: Thu, 1 Jan 2026 22:51:09 +0100 Subject: [PATCH] [fix] widget:weekview:initial-ywd --- source/widgets/weekview/logic.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/source/widgets/weekview/logic.ts b/source/widgets/weekview/logic.ts index 376efa0..0eb86ff 100644 --- a/source/widgets/weekview/logic.ts +++ b/source/widgets/weekview/logic.ts @@ -168,17 +168,25 @@ namespace _dali.widgets this.show_begin_time = show_begin_time; // state - const ywd_now : lib_plankton.pit.type_ywd = lib_plankton.pit.to_ywd(lib_plankton.pit.now()); + // const ywd_now : lib_plankton.pit.type_ywd = lib_plankton.pit.to_ywd(lib_plankton.pit.now()); + const ywd_begin : lib_plankton.pit.type_ywd = lib_plankton.call.convey( + lib_plankton.pit.now(), + [ + x => lib_plankton.pit.shift_week(x, -1), + lib_plankton.pit.to_ywd, + ] + ); + this.vertical = vertical; this.year = ( initial_year ?? - ywd_now.year + ywd_begin.year ); this.week = ( initial_week ?? - Math.max(0, (ywd_now.week - 1)) + ywd_begin.week ); this.count = initial_count; this.event_map = lib_plankton.map.hashmap.implementation_map(