use local instance timezone everywhere #151

This commit is contained in:
lesion
2022-04-27 11:58:58 +02:00
parent 6776b1b1b1
commit 35e44a8a80
7 changed files with 72 additions and 65 deletions

View File

@@ -9,6 +9,7 @@
@update:from-page='updatePage'
:locale='$i18n.locale'
:attributes='attributes'
:timezone='settings.instance_timezone'
transition='fade'
aria-label='Calendar'
is-expanded
@@ -26,8 +27,8 @@ export default {
events: { type: Array, default: () => [] }
},
data () {
const month = dayjs().month() + 1
const year = dayjs().year()
const month = dayjs.tz().month() + 1
const year = dayjs.tz().year()
return {
selectedDate: null,
page: { month, year }
@@ -42,9 +43,7 @@ export default {
methods: {
...mapActions(['updateEvents', 'showPastEvents']),
updatePage (page) {
return new Promise((resolve, reject) => {
this.$emit('monthchange', page)
})
},
click (day) {
this.$emit('dayclick', day)