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(