Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Optional date fields that are blank display today's dateΒ #2533

@wesort

Description

@wesort

Describe the bug
An optional date field displays today's date when it should be blank.

To Reproduce
Steps to reproduce the behavior:

  1. Have a fieldset for a Page with a replicator that includes a date field
  2. date field has "Allow blank values?" toggled on.
  3. Save page with that date field empty
  4. Reload page and today's date appears

Expected behavior
Optional date fields should display "Add Date" button when blank. Adding a new replicator set works as expeced.

Saving the page doesn't save today's date for that field to disk. However, it's confusing.

Date field config
date field config

Date field: with bug, then as expected
date field - bug and expected

Environment details (please complete the following information):

  • Statamic Version 2.11.21
  • Fresh Install or Upgrade: upgrade
  • OS: Ubuntu 18.04.5 LTS
  • Browser: Chrome
  • Web Server: Nginx on Digital Ocean provisioned by Laravel Forge
  • PHP Version: PHP 7.2.24-0ubuntu0.18.04.7
  • Addons installed: Logbook v1.0

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