started working on a leaner picker, added emit to picker

This commit is contained in:
Sockenklaus
2021-10-03 09:26:34 +02:00
parent 59d5d15702
commit 51c9b3ea9e
5 changed files with 19 additions and 5 deletions

View File

@@ -1,8 +1,10 @@
<template lang="pug">
p {{iOffsets}}
p SelectedMonth: {{selectedMonth}}, SelectedYear: {{selectedYear}}
MonthPicker(:selectedMonth="selectedMonth" :selectedYear="selectedYear" state="closed")
MonthPicker(:selectedMonth="selectedMonth" :selectedYear="selectedYear" @getMonth="selectedMonth = $event" @getYear="selectedYear = $event" state="closed")
div(class="mt-5" v-for="(month, index) in months" :key="index")
Schedule( :startDate="month" :initialOffset="iOffsets[index]")
@@ -20,8 +22,8 @@ div(class="mt-5" v-for="(month, index) in months" :key="index")
const months = computed(() => {
return eachMonthOfInterval({
start: new Date(selectedYear.value, selectedMonth.value - 1),
end : new Date(selectedYear.value, selectedMonth.value + 1)
start: new Date(selectedYear.value, selectedMonth.value),
end : new Date(selectedYear.value, selectedMonth.value + 2)
})
})