JS errors when using DatePicker ->native(false) inside livewire component

I have a custom livewire component outside of ghe admin panel. I'm trying to use the JS DatePicker, however it doesn't seem to the load the JS correctly.

This is the main error I get is:

Alpine Expression Error: Can't find variable: dateTimePickerFormComponent

My code inside the form method:

public function form(Form $form): Form { return $form ->schema([ DatePicker::make('arrival') ->native(false) ->disabledDates($this->disabledDates) ->minDate(today()) ->closeOnDateSelection() ->format('d/m/Y') ->required(), ]) ->statePath('data'); }

And where I'm rending the form in the livewire component:

<div> <form wire:submit="search" class="-ml-12"> {{ $this->form }} <div class="px-3"> <x-filament::button type="submit" class="bg-black mt-6 ml-12"> Check Availability </x-filament::button> </div> </form> <x-filament-actions::modals /> </div>

Any ideas on what I could try, am I doing something wrong when registering the component?
Was this page helpful?