mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-31 10:13:32 -04:00 
			
		
		
		
	fix: Mealplan Regressions (#5748)
This commit is contained in:
		| @@ -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,13 +19,17 @@ | |||||||
|           {{ $d(weekRange.start, "short") }} - {{ $d(weekRange.end, "short") }} |           {{ $d(weekRange.start, "short") }} - {{ $d(weekRange.end, "short") }} | ||||||
|         </v-btn> |         </v-btn> | ||||||
|       </template> |       </template> | ||||||
|  |  | ||||||
|  |       <v-card> | ||||||
|         <v-date-picker |         <v-date-picker | ||||||
|           v-model="state.range" |           v-model="state.range" | ||||||
|           hide-header |           hide-header | ||||||
|           :multiple="'range'" |           :multiple="'range'" | ||||||
|           :first-day-of-week="firstDayOfWeek" |           :first-day-of-week="firstDayOfWeek" | ||||||
|           :local="$i18n.locale" |           :local="$i18n.locale" | ||||||
|       > |         /> | ||||||
|  |  | ||||||
|  |         <v-card-text> | ||||||
|           <v-text-field |           <v-text-field | ||||||
|             v-model="numberOfDays" |             v-model="numberOfDays" | ||||||
|             type="number" |             type="number" | ||||||
| @@ -34,15 +37,8 @@ | |||||||
|             :hint="$t('meal-plan.numberOfDays-hint')" |             :hint="$t('meal-plan.numberOfDays-hint')" | ||||||
|             persistent-hint |             persistent-hint | ||||||
|           /> |           /> | ||||||
|         <v-spacer /> |         </v-card-text> | ||||||
|         <v-btn |       </v-card> | ||||||
|           variant="text" |  | ||||||
|           color="primary" |  | ||||||
|           @click="state.picker = false" |  | ||||||
|         > |  | ||||||
|           {{ $t("general.ok") }} |  | ||||||
|         </v-btn> |  | ||||||
|       </v-date-picker> |  | ||||||
|     </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"> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user