Set form field value from outside the form
I am dispatching the 'set-date' event from the blade of a Livewire component and want to set the value of the 'date' form field in my updateDateFormField() method. This looks something like this.
If I change the value with $this->data['date'] = $date, the value is changed to the date, but ->afterStateUpdated() is not executed. Is there any way I can set the value and ->afterStateUpdated() of my form field 'date' will be executed?
3 Replies