From 5666b8b647ef933acee3e1f3bad48b19812b6238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 5 Jul 2024 09:58:49 +0200 Subject: [PATCH] Expand range of calendar weeks in App2.vue to get weeks int the future and in the past The code has been altered to increase the range of weeks computed from 15 to 30, with a modification to the 'getMonday' method accordingly. This enhances the user calendar experience by providing a wider time array to choose from. --- .../Resources/public/vuejs/MyCalendarRange/App2.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/App2.vue b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/App2.vue index e690f9524..883142a51 100644 --- a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/App2.vue +++ b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/App2.vue @@ -237,8 +237,8 @@ const dateOptions: Intl.DateTimeFormatOptions = { }; const lastWeeks = computed((): Weeks[] => - Array.from(Array(15).keys()).map((w) => { - const lastMonday = getMonday(-w); + Array.from(Array(30).keys()).map((w) => { + const lastMonday = getMonday(15-w); return { value: dateToISO(lastMonday), text: `Semaine du ${lastMonday.toLocaleDateString("fr-FR", dateOptions)}`,