Skip to content

Commit

Permalink
Merge pull request #14103 from filamentphp/revert-14063-fix/issue-13988
Browse files Browse the repository at this point in the history
Revert "Enhanced default `focusedDate` logic in `DateTimePicker`"
  • Loading branch information
danharrin authored Aug 30, 2024
2 parents 143e9b8 + 95b1fa9 commit 7e07588
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/forms/dist/components/date-time-picker.js

Large diffs are not rendered by default.

12 changes: 2 additions & 10 deletions packages/forms/resources/js/components/date-time-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 7e07588

Please sign in to comment.