Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Adding readOnly to Date or Datetime fields brook the date configured format #258

@lhoucinecherif

Description

@lhoucinecherif

Hi,
When I set a datetime or date field as Readonly it don't take the format :

in the show method of my Crud config file I have multiple dates

 $form->dt('created_at', 'd/m/Y H:i')
                ->title('Created At')
                ->readonly()
            ;

            $form->date('updated_at', 'd/m/Y H:i')
                ->title('Updated At')
                ->readOnly();

it render the form like this :

image

when I remove the readOnly , it shows :

image

it seems that the readOnly brook the formatting params for date and datetime !!

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions