Skip to content

Read-only date fields show current date in edit screen #2025

@unlikenesses

Description

@unlikenesses
  • Laravel Version: 6.0.2
  • Nova Version: 2.2.0
  • PHP Version: 7.2

Description

I have a resource with a nullable read-only datetime field:

public function fields(Request $request)
{
    return [
        DateTime::make('foobar')->nullable()->readonly(),
    ];
}

When I click "View" on a row which has a null value for foobar, it correctly shows a dash for that field. But when I click "Edit" on the same row, the field is apparently populated with the current date/time. It's not really populated with it, since when you update it correctly does not fill it in. But the appearance is still confusing.

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