mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-06 05:55:23 +02:00
fix: meal planner date range is correctly set (#5725)
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
This commit is contained in:
parent
2731fb4a01
commit
3a1f58037d
1 changed files with 5 additions and 9 deletions
|
@ -115,15 +115,11 @@ export default defineNuxtComponent({
|
||||||
const weekRange = computed(() => {
|
const weekRange = computed(() => {
|
||||||
const sorted = [...state.value.range].sort((a, b) => a.getTime() - b.getTime());
|
const sorted = [...state.value.range].sort((a, b) => a.getTime() - b.getTime());
|
||||||
|
|
||||||
if (sorted.length === 2) {
|
const start = sorted[0];
|
||||||
return {
|
const end = sorted[sorted.length - 1];
|
||||||
start: sorted[0],
|
|
||||||
end: sorted[1],
|
if (start && end) {
|
||||||
};
|
return { start, end };
|
||||||
// return {
|
|
||||||
// start: parseYYYYMMDD(sorted[0]),
|
|
||||||
// end: parseYYYYMMDD(sorted[1]),
|
|
||||||
// };
|
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
start: new Date(),
|
start: new Date(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue