1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-04 04:55:21 +02:00

fix: Mealplan Regressions (#5748)

This commit is contained in:
Michael Genson 2025-07-18 17:24:59 -05:00 committed by GitHub
parent 108ac40b22
commit aafed68964
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 25 additions and 25 deletions

View file

@ -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();

View file

@ -5,7 +5,6 @@
:close-on-content-click="false"
transition="scale-transition"
offset-y
max-width="290px"
min-width="auto"
>
<template #activator="{ props }">
@ -20,13 +19,17 @@
{{ $d(weekRange.start, "short") }} - {{ $d(weekRange.end, "short") }}
</v-btn>
</template>
<v-card>
<v-date-picker
v-model="state.range"
hide-header
:multiple="'range'"
:first-day-of-week="firstDayOfWeek"
:local="$i18n.locale"
>
/>
<v-card-text>
<v-text-field
v-model="numberOfDays"
type="number"
@ -34,15 +37,8 @@
:hint="$t('meal-plan.numberOfDays-hint')"
persistent-hint
/>
<v-spacer />
<v-btn
variant="text"
color="primary"
@click="state.picker = false"
>
{{ $t("general.ok") }}
</v-btn>
</v-date-picker>
</v-card-text>
</v-card>
</v-menu>
<div class="d-flex flex-wrap align-center justify-space-between mb-2">