fix(gantt): correctly show month and year in gantt chart on safari
continuous-integration/drone/push Build is failing Details

Resolves https://github.com/go-vikunja/frontend/issues/59
This commit is contained in:
kolaente 2022-07-08 16:39:21 +02:00
parent f3835d7dfe
commit 40b30079c1
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 2 deletions

View File

@ -16,7 +16,7 @@
class="month"
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="{ today: d.toDateString() === now.toDateString() }"
@ -436,7 +436,9 @@ export default defineComponent({
this.newTaskTitle = ''
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')
},
},