mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-03 20:45:23 +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,
|
||||
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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue