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:
parent
108ac40b22
commit
aafed68964
2 changed files with 25 additions and 25 deletions
|
@ -269,13 +269,17 @@ export default defineNuxtComponent({
|
||||||
recipeName: props.name,
|
recipeName: props.name,
|
||||||
loading: false,
|
loading: false,
|
||||||
menuItems: [] as ContextMenuItem[],
|
menuItems: [] as ContextMenuItem[],
|
||||||
newMealdate: new Date(Date.now() - new Date().getTimezoneOffset() * 60000),
|
newMealdate: new Date(),
|
||||||
newMealType: "dinner" as PlanEntryType,
|
newMealType: "dinner" as PlanEntryType,
|
||||||
pickerMenu: false,
|
pickerMenu: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const newMealdateString = computed(() => {
|
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();
|
const i18n = useI18n();
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
:close-on-content-click="false"
|
:close-on-content-click="false"
|
||||||
transition="scale-transition"
|
transition="scale-transition"
|
||||||
offset-y
|
offset-y
|
||||||
max-width="290px"
|
|
||||||
min-width="auto"
|
min-width="auto"
|
||||||
>
|
>
|
||||||
<template #activator="{ props }">
|
<template #activator="{ props }">
|
||||||
|
@ -20,29 +19,26 @@
|
||||||
{{ $d(weekRange.start, "short") }} - {{ $d(weekRange.end, "short") }}
|
{{ $d(weekRange.start, "short") }} - {{ $d(weekRange.end, "short") }}
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</template>
|
</template>
|
||||||
<v-date-picker
|
|
||||||
v-model="state.range"
|
<v-card>
|
||||||
hide-header
|
<v-date-picker
|
||||||
:multiple="'range'"
|
v-model="state.range"
|
||||||
:first-day-of-week="firstDayOfWeek"
|
hide-header
|
||||||
:local="$i18n.locale"
|
:multiple="'range'"
|
||||||
>
|
:first-day-of-week="firstDayOfWeek"
|
||||||
<v-text-field
|
:local="$i18n.locale"
|
||||||
v-model="numberOfDays"
|
|
||||||
type="number"
|
|
||||||
:label="$t('meal-plan.numberOfDays-label')"
|
|
||||||
:hint="$t('meal-plan.numberOfDays-hint')"
|
|
||||||
persistent-hint
|
|
||||||
/>
|
/>
|
||||||
<v-spacer />
|
|
||||||
<v-btn
|
<v-card-text>
|
||||||
variant="text"
|
<v-text-field
|
||||||
color="primary"
|
v-model="numberOfDays"
|
||||||
@click="state.picker = false"
|
type="number"
|
||||||
>
|
:label="$t('meal-plan.numberOfDays-label')"
|
||||||
{{ $t("general.ok") }}
|
:hint="$t('meal-plan.numberOfDays-hint')"
|
||||||
</v-btn>
|
persistent-hint
|
||||||
</v-date-picker>
|
/>
|
||||||
|
</v-card-text>
|
||||||
|
</v-card>
|
||||||
</v-menu>
|
</v-menu>
|
||||||
|
|
||||||
<div class="d-flex flex-wrap align-center justify-space-between mb-2">
|
<div class="d-flex flex-wrap align-center justify-space-between mb-2">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue