Skip to content

[POS UI Extensions] Empty DateField displays today's date #2099

Open
@timvandam

Description

@timvandam

Please list the package(s) involved in the issue, and include the version you are using

@shopify/[email protected]

Describe the bug

Empty date fields display today's date rather than being empty. That's not nice for optional date fields

If you omit the value prop, set it to undefined or provide an invalid date it will default to today's date

Steps to reproduce the behavior:

  1. <DateField label="asd" />
  2. <DateField label="asd" value={undefined} />
  3. <DateField label="asd" value={'some invalid value'} />

Expected behavior

It should be empty

Screenshots

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions