v2-hub icon indicating copy to clipboard operation
v2-hub copied to clipboard

Optional date fields that are blank display today's date

Open wesort opened this issue 4 years ago • 0 comments

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

wesort avatar Feb 15 '21 20:02 wesort