Relationship error in EditResource

Hi everyone!
I'm facing an issue with relations in my EditResource.
The relation elements are not all loading properly.
For example, DatePicker fields are not filled with relation data, but the title field works fine.

Tables structure:
table_1: id published (bool) completed (bool) table_2: id table_1_id start (date) end (date) title (string) content (text)

Model relation: hasOne from table_1 to table_2

Edit form code:

public function form(Form $form): Form
{
    return $form
        ->schema([
            Section::make('Name of the section 1')
                ->schema([
                    Toggle::make('published')->required()
                ]),
            Section::make('Name of the section 2')
                ->schema([
                    Toggle::make('completed')->required(),
                    Group::make()
                        ->columns()
                        ->relationship('infos')
                        ->schema([
                            DatePicker::make('start')
                                ->label('Start date')
                                ->required(),
                            DatePicker::make('end')
                                ->label('End date')
                                ->required(),
                            TextInput::make('title')                       
                                ->required(),
                        ])
                ]),
             Section::make('Name of the section 3')
                ->relationship('infos')
                ->schema([
                    RichEditor::make('content')
                ]),
        ]);
}


Issue: Only the title field loads correctly, but start and end DatePicker fields remain empty even though the data exists in the database.
Was this page helpful?