saade / filament-fullcalendar

The Most Popular JavaScript Calendar as a Filament Widget
MIT License
295 stars 88 forks source link

onDateSelect not triggerd (CreateForm not opened) #194

Open David-Grass-Feria opened 5 months ago

David-Grass-Feria commented 5 months 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 4 months ago

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

David-Grass-Feria commented 4 months 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 4 months ago

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