Benjamin
DatePicker/DateTimePicker alternative with manual typing support
Does anyone here already made a custom
DatePicker
/DateTimePicker
or found an alternative version that allow manual typing ? I really need it and I know some people already asked for it (https://github.com/filamentphp/filament/discussions/6209 and https://github.com/filamentphp/filament/discussions/6817) so maybe I don't have to do it from scratch.
Edit : It' s possible to use ->type('datetime-local')
, but then I lost all DatePicker great utilities such as firstDayOfWeek()
, disabledDates()
, minDate()
and maxDate()
. Yes, minDate()
and maxDate()
can be replaced by something like ->extraInputAttributes(['max' => now()->isoFormat('YYYY-MM-DDTHH:mm')])
, but the problem is that when using TextInput
with a specific type
, the field is not updated when using refreshFormData
and a complete page reload (F5) is necessary.
Thanks 🙏14 replies
Refresh my form after custom "Cancel" action
Hi guys. I created an action that allow to cancel a mission (switch status + fill cancellation related fields). Those fields are visible on my
MissionResource.php
only if the status is CANCELLED.
The problem is, when the action is performed, the fields appears but they are not fill with the data I just typed, but those that where loaded at the loading of the page. I tried to use protected $listeners = ['refreshEditMissions' => '$refresh'];
on the EditMissions.php
page and dispatch the event in the action, I tried to use the refreshFormData
method, but nothing is working. Please help 🙏
Here is my action code : https://pastebin.com/LNDJSQt64 replies
JS error : "Livewire assets are out of date"
Hi guys, I made a few changes on my Filament app and now login isn't working anymore and I think it's related to Livewire because I have this error in the console and even the password input doesn't work anymore. Do you have any advice to help me ? I'm struggling since 2 hours on it...
I also tried , then livewire is correctly loaded but the login is just redirecting me to the login page.
6 replies
Unique rule with MorphToSelect fields
Hi ! I'm trying to create a form for a
"relations"
polymorphic table I have in my database to manage relations between three entities (Users, Companies and Institutions). Here is the table code :
I already used ->unique()
method on classic Select fields like that :
But is there any possibility define a unique()
rule on MorphToSelect
fields ?
Thanks in advance !2 replies