mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
resolve issue with focused month getting out of sync
This commit is contained in:
+1
-1
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() ??
|
||||
|
||||
Reference in New Issue
Block a user