mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
Fix meal planner date range is correctly set
This commit is contained in:
parent
644e871ec1
commit
baca920a88
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