v2-hub
v2-hub copied to clipboard
Optional date fields that are blank display today's date
Describe the bug An optional date field displays today's date when it should be blank.
To Reproduce Steps to reproduce the behavior:
- Have a fieldset for a
Pagewith areplicatorthat includes adatefield datefield has "Allow blank values?" toggled on.- Save
pagewith thatdatefield empty - 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: with bug, then as 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