Merge pull request #14103 from filamentphp/revert-14063-fix/issue-13988

Revert "Enhanced default `focusedDate` logic in `DateTimePicker`"
This commit is contained in:
Dan Harrin
2024-08-30 19:01:07 +01:00
committed by GitHub
3 changed files with 4 additions and 12 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -386,16 +386,8 @@ export default function dateTimePickerFormComponent({
if (!this.isOpen()) {
this.focusedDate =
this.getSelectedDate() ??
(dayjs()
.tz(timezone)
.isBetween(
this.getMinDate(),
this.getMaxDate(),
null,
'[]',
)
? dayjs().tz(timezone)
: this.getMinDate() ?? this.getMaxDate())
this.getMinDate() ??
dayjs().tz(timezone)
this.setupDaysGrid()
}