saade / filament-fullcalendar

The Most Popular JavaScript Calendar as a Filament Widget
MIT License
282 stars 85 forks source link

Problem with DatePicker & TimePicker on creation popup #109

Closed sheepbild closed 1 year ago

sheepbild commented 1 year ago

Hello I'm not able to use "default()" and "minDate()" functions for DatePicker/TimePicker on getCreateEventFormSchema() while it works on plain FilamentPHP form (Eg. on Resource::form() function). I tried with several formats but it is not working : protected static function getCreateEventFormSchema(): array { return [ DatePicker::make('journee') ->required() ->label('Journée') ->default(now()) ->minDate(now()->subDay(1)), TimePicker::make('start') ->label('Début') ->default(now()) ->seconds(false) ->required(), TimePicker::make('end') ->label('Fin') ->default(now()) ->seconds(false) ->required(), Select::make('user') ->label('Elève') ->options(User::all()->sortBy('name')->pluck('name', 'id')) ->searchable() ->default(null), Toggle::make('is_paid') ->label('Est payé') ]; }

image

Version of the package : ^3.0.0-beta

sheepbild commented 1 year ago

Maybe it's due to this error, I am digging image

sheepbild commented 1 year ago

I tried this but not able to remove "fullcalendar is not defined" error : image

I also tried with linking filament-fullcalendar.js as the path given above doesn't exists in my vendors image

bobwurtz commented 1 year ago

@sheepbild I am experiencing the same issue. Have you been able to solve this? It is affecting my ability to refresh the events.

saade commented 1 year ago

@sheepbild I am experiencing the same issue. Have you been able to solve this? It is affecting my ability to refresh the events.

v3 is out, please give it a try and see if you're still facing issues

bobwurtz commented 1 year ago

@saade Yup, it's gone. Thank you! Now I get a Unknown option 'schedulerLicenseKey' warning but it's not an error. I'll let you know if that starts causing problems.

By the way, I think you have a typo in your docs. In the Configuration section where it says ->fullCalendarConfig(), I think you mean ->config() - this is how you refer to it later. I get an undefined method error when I use ->fullCalendarConfig().

saade commented 1 year ago

@saade Yup, it's gone. Thank you! Now I get a Unknown option 'schedulerLicenseKey' warning but it's not an error. I'll let you know if that starts causing problems.

By the way, I think you have a typo in your docs. In the Configuration section where it says ->fullCalendarConfig(), I think you mean ->config() - this is how you refer to it later. I get an undefined method error when I use ->fullCalendarConfig().

Oh yeah, i should probably only add schedulerLicenseKey to the calendar if the resourceTimeline plugin is active. But this warning shouldn't cause any problems.

And yes, its config not fullcalendarConfig thanks for pointing that out

albertobenavides commented 9 months ago

I dont know if this is related, but Im getting this: image

Also, I cant enable selectable option. Thats why I think this might be related.