statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

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

Open wesort opened 3 years ago

wesort commented 3 years ago

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):