Replies: 3 comments
-
|
I just found out. class CalendarWidget extends FullCalendarWidget
{
protected function viewAction(): Action
{
return Actions\EditAction::make();
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I tried this action, but the modal is empty. Could you tell me how you did this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Hi, this is snippet from my code., set viewAction and than setup return Actions\EditAction::make()
->mountUsing(
function (Lesson $lesson, Forms\Form $form, array $arguments) {
$start_time = $arguments['event']['start'] ?? $lesson->start_time;
$end_time = Carbon::parse($arguments['event']['end']);
$duration = (int)Carbon::parse($arguments['event']['start'])->diffInMinutes($end_time);
$form->fill([
'id' => $lesson->id,
'lesson_schedule_id' => $lesson->lesson_schedule_id,
'lesson_schedule_date' => $lesson->lesson_schedule_date,
'completed_hours' => $lesson->completed_hours,
'note' => $lesson->note,
'start_time' => $start_time,
'duration' => $duration ?? $lesson->duration,
'canceled' => $lesson->canceled,
'meeting_url' => $lesson->schedule->meeting_url,
]);
}
); public function getFormSchema() : array
{
return [
// Forms\Components\TextInput::make('id'),
// Forms\Components\TextInput::make('lesson_schedule_id'),
// Forms\Components\Hidden::make('lesson_schedule_date'),
Forms\Components\Grid::make()
->schema([
Forms\Components\DateTimePicker::make('start_time'),
Forms\Components\TextInput::make('duration')
->numeric()
->step(15),
]), |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
Hi, Is it possible to make the modal form open for editing after clicking on the event?
Now the view opens for me, and I there is edit button. What is the extra step?
Beta Was this translation helpful? Give feedback.
All reactions