fix(gantt): correctly show month and year in gantt chart on safari
Resolves https://github.com/go-vikunja/frontend/issues/59
This commit is contained in:
parent
f3835d7dfe
commit
40b30079c1
1 changed files with 4 additions and 2 deletions
|
@ -16,7 +16,7 @@
|
||||||
class="month"
|
class="month"
|
||||||
v-for="(m, mk) in days[yk]"
|
v-for="(m, mk) in days[yk]"
|
||||||
>
|
>
|
||||||
{{ formatYear(new Date(`${yk}-${parseInt(mk) + 1}-01`)) }}
|
{{ formatMonthAndYear(yk, parseInt(mk) + 1) }}
|
||||||
<div class="days">
|
<div class="days">
|
||||||
<div
|
<div
|
||||||
:class="{ today: d.toDateString() === now.toDateString() }"
|
:class="{ today: d.toDateString() === now.toDateString() }"
|
||||||
|
@ -436,7 +436,9 @@ export default defineComponent({
|
||||||
this.newTaskTitle = ''
|
this.newTaskTitle = ''
|
||||||
this.hideCrateNewTask()
|
this.hideCrateNewTask()
|
||||||
},
|
},
|
||||||
formatYear(date) {
|
formatMonthAndYear(year, month) {
|
||||||
|
month = month < 10 ? '0' + month : month
|
||||||
|
const date = new Date(`${year}-${month}-01`)
|
||||||
return this.format(date, 'MMMM, yyyy')
|
return this.format(date, 'MMMM, yyyy')
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue