From aafed689648195cba96f14bb83fcba1683a5cdfb Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Fri, 18 Jul 2025 17:24:59 -0500 Subject: [PATCH] fix: Mealplan Regressions (#5748) --- .../Domain/Recipe/RecipeContextMenu.vue | 8 +++- frontend/pages/household/mealplan/planner.vue | 42 +++++++++---------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/frontend/components/Domain/Recipe/RecipeContextMenu.vue b/frontend/components/Domain/Recipe/RecipeContextMenu.vue index 1a034d065..95d45ffc3 100644 --- a/frontend/components/Domain/Recipe/RecipeContextMenu.vue +++ b/frontend/components/Domain/Recipe/RecipeContextMenu.vue @@ -269,13 +269,17 @@ export default defineNuxtComponent({ recipeName: props.name, loading: false, menuItems: [] as ContextMenuItem[], - newMealdate: new Date(Date.now() - new Date().getTimezoneOffset() * 60000), + newMealdate: new Date(), newMealType: "dinner" as PlanEntryType, pickerMenu: false, }); const newMealdateString = computed(() => { - return state.newMealdate.toISOString().substring(0, 10); + // Format the date to YYYY-MM-DD in the same timezone as newMealdate + const year = state.newMealdate.getFullYear(); + const month = String(state.newMealdate.getMonth() + 1).padStart(2, "0"); + const day = String(state.newMealdate.getDate()).padStart(2, "0"); + return `${year}-${month}-${day}`; }); const i18n = useI18n(); diff --git a/frontend/pages/household/mealplan/planner.vue b/frontend/pages/household/mealplan/planner.vue index 273a466d4..df05e04c3 100644 --- a/frontend/pages/household/mealplan/planner.vue +++ b/frontend/pages/household/mealplan/planner.vue @@ -5,7 +5,6 @@ :close-on-content-click="false" transition="scale-transition" offset-y - max-width="290px" min-width="auto" > - - + - - - {{ $t("general.ok") }} - - + + + + +