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

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

Open
wesort opened this issue Feb 15, 2021 · 0 comments
Open

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

wesort opened this issue Feb 15, 2021 · 0 comments

Comments

@wesort
Copy link

wesort commented Feb 15, 2021

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant