saade / filament-fullcalendar

The Most Popular JavaScript Calendar as a Filament Widget
MIT License
262 stars 79 forks source link

onDateSelect not triggerd (CreateForm not opened) #194

Open David-Grass-Feria opened 1 month ago

David-Grass-Feria commented 1 month ago

Version 3.2.2

I use a costum Page, for the Widget.

<x-filament-panels::page>
    @livewire(\App\Livewire\ScheduleCalendarWidget::class)
</x-filament-panels::page>

` All works perfect. But the onDateSelect not triggerd. When i click a empty day, the Modal CreateForm will not open.

After that i made a test, and use your trait.

use InteractsWithEvents;
 public function onDateSelect(string $start, ?string $end, bool $allDay, ?array $view, ?array $resource): void
    {
      dd('test');
    }

This not work.

But your Create Button works.

    protected function headerActions(): array
    {
        return [
            CreateAction::make(),
        ];
    }

This open the create form and works. But when i click a date in the calendar, the modal will not opened. And there is no erros in dev tools. I can not debug it.

saade commented 1 month ago

hey! did you added ->selectable() to the plugin configuration?

David-Grass-Feria commented 1 month ago

Hey saade, thanks for your answere. Yes i made it. But in the last weeks i greated again, without your package. Now it works all. I dont know what is wrong. I added the fullcalendar without package, and it works. You should check this event in your package: dateClick: function(info) { // },

SariMorgenshtern commented 1 month ago

I'm trying to use the dateClick event: function(info) { // }, is he ok?