Azka
Azka
FFilament
Created by Azka on 9/10/2024 in #❓┊help
Having TextInput in CreateAction breaks closing modals by clicking outside
I'm using this one: https://filamentphp.com/docs/3.x/actions/prebuilt-actions/create#overview Here is how i built it: CreateAction::make() ->label(__('wedding_page.add_gift')) ->modalHeading(__('wedding_page.add_gift')) ->modalSubmitActionLabel(__('wedding_page.create_gift')) ->disableCreateAnother() ->form([ TextInput::make('title') ->required() ->label(__('wedding_page.gift_title')), TextInput::make('description') ->label(__('wedding_page.gift_description')), TextInput::make('link') ->url() ->label(__('wedding_page.gift_link')), FileUpload::make('image') ->image() ->disk('public') ->directory('wedding_gifts') ->label(__('wedding_page.gift_image')) ->imageEditor() ->columnSpanFull(), ]) ->using(function (array $data): WeddingGift { if (!$this->publicPage) { throw new \Exception(__('wedding_page.no_public_page')); } $gift = $this->publicPage->weddingGifts()->create($data); return $gift; })
5 replies
FFilament
Created by Azka on 9/10/2024 in #❓┊help
Having TextInput in CreateAction breaks closing modals by clicking outside
Let me know if there is any other info i can provide, or if you have any ideas on how i can troubleshoot this further! First my idea was that something else on the site "disturbs" when clicking away on Filament-modals, but since it works when i dont have any fields in the modals, im not sure thats the case.
5 replies
FFilament
Created by Azka on 9/10/2024 in #❓┊help
Having TextInput in CreateAction breaks closing modals by clicking outside
Also just did some more testing by adding ->disabledForm() under the ->form, and that makes the modal work as expected where you can close it by clicking outside. So there is some kind of issue with the forms in the modal i guess. I tried to remove all the TextInput in the ->form - and only keep the FIleUpload. Then the modal works also, so there is something with TextInput causing this.
5 replies
FFilament
Created by Azka on 7/2/2024 in #❓┊help
6 digits in year usingDateTimePicker & DatePicker
Thanks alot, that solved it. For others looking for the solution, here is how i added it: With DateTimePicker ->maxDate('9999-12-31T23:59') and with DatePicker: ->maxDate('9999-12-31')
9 replies
FFilament
Created by Azka on 7/2/2024 in #❓┊help
6 digits in year usingDateTimePicker & DatePicker
In the DB, the starts_at and ends_at is datetime, not string. I dont set a default date in the code from what i can find. Here is the whole code, super thankfull if you have time to have a look: https://codeshare.io/Q8QgNm
9 replies
FFilament
Created by Azka on 7/2/2024 in #❓┊help
6 digits in year usingDateTimePicker & DatePicker
No description
9 replies