What seems to be the problem: datepicker Livewire component is not making server roundtrip and so is not in sync with the public property in the component’s php file.
Steps to Reproduce:
Make a component as
-
php artisan make:component DatePicker
-
in date-picker.blade.php file
<input
x-data
x-ref=“input”
x-init=“new Pikaday({ field: $refs.input })”
type=“text”
{{ $attributes }}
>
-
use the component as:
<x-date-picker wire:model="date" id="date"/>
-
and in the class file:
public $date = 2020-01-01;
-
now when a new date is selected, the $date field is not updated.
Are you using the latest version of Livewire: yes
Do you have any screenshots or code examples: