mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
make consistent with 4.x
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
$suffixIcon = $getSuffixIcon();
|
||||
$suffixLabel = $getSuffixLabel();
|
||||
$statePath = $getStatePath();
|
||||
$disabledDates = $getDisabledDates();
|
||||
@endphp
|
||||
|
||||
<x-dynamic-component
|
||||
@@ -81,6 +82,13 @@
|
||||
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
|
||||
@@ -96,7 +104,7 @@
|
||||
<input
|
||||
x-ref="disabledDates"
|
||||
type="hidden"
|
||||
value="{{ json_encode($getDisabledDates()) }}"
|
||||
value="{{ json_encode($disabledDates) }}"
|
||||
/>
|
||||
|
||||
<button
|
||||
|
||||
@@ -522,21 +522,4 @@ class DateTimePicker extends Field implements Contracts\HasAffixActions
|
||||
|
||||
return 'datetime-local';
|
||||
}
|
||||
|
||||
public function getKey(bool $isAbsolute = true): ?string
|
||||
{
|
||||
if ($this->isNative() || $this->key !== null) {
|
||||
return parent::getKey($isAbsolute);
|
||||
}
|
||||
|
||||
$values = [
|
||||
'minDate' => $this->getMinDate(),
|
||||
'maxDate' => $this->getMaxDate(),
|
||||
'disabledDates' => $this->getDisabledDates(),
|
||||
];
|
||||
|
||||
$this->key = substr(md5(serialize($values)), 0, 8);
|
||||
|
||||
return parent::getKey($isAbsolute);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user