Merge pull request #16762 from aleksanm/3.x

Duplicate  "Fix DatePicker in SPA mode #16632" for v3
This commit is contained in:
Dan Harrin
2025-07-03 09:03:17 +01:00
committed by GitHub
@@ -17,6 +17,7 @@
$suffixIcon = $getSuffixIcon();
$suffixLabel = $getSuffixLabel();
$statePath = $getStatePath();
$disabledDates = $getDisabledDates();
@endphp
<x-dynamic-component
@@ -80,6 +81,14 @@
shouldCloseOnDateSelection: @js($shouldCloseOnDateSelection()),
state: $wire.{{ $applyStateBindingModifiers("\$entangle('{$statePath}')") }},
})"
wire:ignore
wire:key="{{ $this->getId() }}.{{ $statePath }}.{{ $field::class }}.{{
substr(md5(serialize([
'disabledDates' => $disabledDates,
'maxDate' => $maxDate,
'minDate' => $minDate,
])), 0, 64)
}}"
x-on:keydown.esc="isOpen() && $event.stopPropagation()"
{{
$attributes
@@ -95,7 +104,7 @@
<input
x-ref="disabledDates"
type="hidden"
value="{{ json_encode($getDisabledDates()) }}"
value="{{ json_encode($disabledDates) }}"
/>
<button