Open jordivela007 opened 1 year ago
Hello, Did you find any solution ??
I find a solution.
in the blade you can do this:
<div>
<div id="calendar-container">
<div id="external-events" class="basis-20 box-border rounded-lg border-2 shadow-md cursor-pointer">
<div class="flex flex-row">
@if ($calendarevents->count() > 0)
@foreach ($calendarevents as $calendarevent)
<div class="basis-20 box-border rounded-lg border-2 shadow-md cursor-pointer" draggable="true"
ondragstart="onLivewireCalendarEventDragStart(event, 'C{{ $calendarevent->id }}')"
style="background-color:{{ $calendarevent->backgroundColor }};border-color:{{ $calendarevent-
>isBlocked ? '#000000' : $calendarevent->backgroundColor }};">
<p class="text-sm font-medium">
{{ $calendarevent->title }}
</p>
<p class="mt-2 text-xs>">
{{ $calendarevent->description }}
</p>
</div>
@endforeach
@else
<strong>You need to create a User Calendar/strong>
@endif
</div>
</div>
<div id="calendar" class="basis-20 box-border rounded-lg border-2 shadow-md cursor-pointer">
<livewire:event-grid-component week-starts-at="1" before-calendar-view="livewire.events.before" />
</div>
</div>
</div>
I want to drag/drop events from a list and put in the calendar in specific day. How can i do this?