diff --git a/src/components/tasks/gantt-component.vue b/src/components/tasks/gantt-component.vue index 2ed3a0b7d..aa55affef 100644 --- a/src/components/tasks/gantt-component.vue +++ b/src/components/tasks/gantt-component.vue @@ -25,17 +25,12 @@ v-for="(m, mk) in days[yk]" > {{ - new Date( - new Date(yk).setMonth(mk) - ).toLocaleString('en-us', {month: 'long'}) + new Date(new Date(`${yk}-${parseInt(mk) + 1}-01`)).toLocaleString('en-us', {month: 'long'}) }}, {{ new Date(yk).getFullYear() }}
[months => [days]] @@ -306,14 +299,14 @@ export default { years[date.getFullYear() + ''] = {} } if ( - years[date.getFullYear() + ''][date.getMonth() + ''] === - undefined + years[date.getFullYear() + ''][date.getMonth() + ''] === undefined ) { years[date.getFullYear() + ''][date.getMonth() + ''] = [] } years[date.getFullYear() + ''][date.getMonth() + ''].push(date) this.fullWidth += this.dayWidth } + console.log(years) this.$set(this, 'days', years) }, parseTasks() {