Skip to content

[Bug]: Closing modal when navigating to next month or next year #127

@yung-esco

Description

@yung-esco

What happened?

When i use the calendar inside a modal view using modalContent method, if i click on the next month or next year button, it automatically close the modal

How to reproduce the bug

This is the code i use to include calendar inside modal view

public function showCalendar(): Action {

        return Action::make('show_calendar')
            ->modal()
            ->label(fn() => __('Calendrier des sessions'))
            ->slideOver()
            ->closeModalByClickingAway(false)
            ->closeModalByEscaping(false)
            ->modalSubmitAction(false)
            ->modalCancelActionLabel(__('Fermer le calendrier'))
            ->modalContent(function(Action $action) {
                return view('filament.components.training_mini_calendar', $action->getArguments());
            })
            ->modalFooterActionsAlignment(Alignment::End);
}

This is the code of the component that rendering the calendar widget

@livewire(\App\Livewire\DirectPackCalendar::class, [
    'uuid' => $uuid
])
Image

When i click on one of the buttons to navigate through the calendar, it close the modal automatically

Package Version

2.1

PHP Version

8.4

Laravel Version

12

Which operating systems does with happen with?

macOS

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions