diff --git a/app/Models/Event.php b/app/Models/Event.php index a481408c..30759bcb 100644 --- a/app/Models/Event.php +++ b/app/Models/Event.php @@ -6,6 +6,7 @@ use Carbon\Carbon; use Filament\Forms\Components\DateTimePicker; use Filament\Forms\Components\Section; +use Filament\Forms\Components\Select; use Filament\Forms\Components\TextInput; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; @@ -38,6 +39,11 @@ public static function getForm(): array ->columns(1) ->schema([ TextInput::make('title')->required(), + Select::make('collection_id') + ->searchable() + ->preload() + ->relationship(name: 'collection', titleAttribute: 'name') + ->label('Collection'), TextInput::make('description')->required(), TextInput::make('location'), ]), @@ -46,8 +52,12 @@ public static function getForm(): array ->columns(2) ->schema([ - DateTimePicker::make('start_date')->required(), - DateTimePicker::make('end_date')->required(), + DateTimePicker::make('start_date') + ->native(false) + ->required(), + DateTimePicker::make('end_date') + ->native(false) + ->required(), ]), ]; } diff --git a/tests/fixtures/.DS_Store b/tests/fixtures/.DS_Store index 5fb14f77..c89c512d 100644 Binary files a/tests/fixtures/.DS_Store and b/tests/fixtures/.DS_Store differ