Ability to add an event occurring in multiples dates?
rapgithub opened this issue · 4 comments
how to add the ability to add same event in multiples days selecting a range of dates for an event?
it there a sample for this?
thanks
anyone considering this use so in the calendar it shows the event occurring in multiple days from start to end dates?
sadly no reply from anyone! package is not live active I think... sadly!
Hello @rapgithub!
Did you find what you were looking for in another package?
I'm looking for the same thing, and I also need to be able to create or generate a yearly view from the calendar...
You'll need to pass two fields into the collection, start_date, and end_date.
Then modify the LivewireCalendar.php file and replace getEventsForDay
public function getEventsForDay($day, Collection $events) : Collection
{
return $events
->filter(function ($event) use ($day) {
return Carbon::parse($day)->between($event['start_date'],$event['end_date']);
});
}
Do note that this will assume that the start time is the original start time. So you may want to put some logic in to take that into account