Open GeoSot opened 9 months ago
Hey, same for me, I need to turn EventData's to arrays to be able to view my events on the calendar.
For me this works
$data = Day::query()
->where('ddate', '>=', $fetchInfo['start'])
->where('ddate', '<=', $fetchInfo['end'])
->get()
->map(
fn (Day $event) => EventData::make()
->id($event->id)
->title($event->name)
->start($event->ddate)
->end($event->ddate)
->url(
url: DayResource::getUrl(name: 'edit', parameters: ['record' => $event]),
shouldOpenUrlInNewTab: true
)
)->toArray();
return $data;
Hello @saade
Firstly, I would like to thank you for this package, as it is a very handy helper tool
I tried to use it, according to the documentation and fell into the following issues.
While I am returning, an array of EventData objects, like below, calendars appears empty![image](https://github.com/saade/filament-fullcalendar/assets/22406063/eac19c9e-23e7-4120-9677-06730bfb99dd)
However, it can be easily fixed, if I just transform each EventData to array![image](https://github.com/saade/filament-fullcalendar/assets/22406063/d758081b-1039-4dec-8367-7efb6b25e4eb)
At this point, I am getting results.
But again I faced another issue.
In order these events to have the proper time, I need to translate it first at localString (I have tried of course to enforce timezone to calendar plugin, but no result)![image](https://github.com/saade/filament-fullcalendar/assets/22406063/df27862b-17aa-4cda-9ff2-7aff36ccd8a8)
I don't mind, a lot, as I got to a workaround, but seemed fair to report these minor issues
Thank you for your time here