Skip to content

[6.x] Difference in behavior between empty date and time fields #13201

@daun

Description

@daun

Bug description

There's a slight mismatch in UX between date and time fields that are empty.

  • Empty date fields show no input, but an Add date button.
  • Empty time fields show an input with a nested Set to now icon.

It would be great if these two fields could match a bit more in terms of behavior and styling when empty, seeing how they are quite often used side by side.

Current

Image

Suggestion

Image

Personally, I think the Add date button pattern works really well to communicate at a glance that no date has been set. Great for scanning the whole form. Treating the time input the same by showing an Add time or Set time button would sound logical to me.

Having both show an input in the empty state is probably something you could equally make a case for.

How to reproduce

Blueprint:

title: Page
tabs:
  main:
    display: Main
    sections:
      -
        display: Dates
        fields:
          -
            handle: date_field
            field:
              type: date
              display: Date
              width: 50
          -
            handle: time_field
            field:
              type: time
              display: Time
              width: 50

Logs

Environment

6.0-alpha.17

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions