Skip to content
Discussion options

You must be logged in to vote

Hello @NeguinhoAdmin

You need to get the values and add it to the field, can see our demo for an example:

protected function setupCreateOperation(): void
    {
        ...

        $start = request()->has('start') ? Carbon::parse(request('start')) : null;
        $end = request()->has('end') ? Carbon::parse(request('end')) : null;

       ...

        CRUD::field('start')
            ->type('datetime')
            ->wrapper(['class' => 'form-group col-md-6'])
            ->value($start);

        CRUD::field('end')
            ->type('datetime')
            ->wrapper(['class' => 'form-group col-md-6'])
            ->value($end);
    }

Cheers.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by NeguinhoAdmin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants