resolve issue with focused month getting out of sync

This commit is contained in:
Dan Harrin
2025-06-24 13:53:10 +01:00
parent ab75f3ef48
commit 2c4bc5d9c3
2 changed files with 6 additions and 4 deletions
File diff suppressed because one or more lines are too long
@@ -53,9 +53,11 @@ export default function dateTimePickerFormComponent({
init: function () {
dayjs.locale(locales[locale] ?? locales['en'])
this.focusedDate = dayjs().tz(timezone)
this.focusedMonth = this.focusedDate.month()
this.focusedYear = this.focusedDate.year().toString()
this.$nextTick(() => {
this.focusedDate ??= dayjs().tz(timezone)
this.focusedMonth ??= this.focusedDate.month()
this.focusedYear ??= this.focusedDate.year()
})
let date =
this.getSelectedDate() ??