Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date Widget Property Gets Removed if value is 'blank' - ( For Widget Nested Inside an Object ) #1276

Closed
ghost opened this issue Apr 17, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 17, 2018

- Do you want to request a feature or report a bug?
Bug
- What is the current behavior?
In this code,

- name: "pre-ico"
  label: "Pre ICO Information"
  widget: object
  fields:
   - label: "Pre ICO Start Date"
     name: "start-date"
     widget: "date"
     default: ""
     format: "MMM-DD-YYYY"
   - label: "Pre ICO End Date"
     name: "end-date"
     widget: "date"
     default: ""
     format: "MMM-DD-YYYY"

Instead of returning
start-date: ''
the start date property is removed from the file if left blank while saving
strangely though the end date property gets saved correctly as
end-date: ''

- If the current behavior is a bug, please provide the steps to reproduce.
Please use the above configuration code and set date fields to blank to reproduce the issue
- What is the expected behavior?
blank date fields set properly as
start-date: ''
end-date: ''

- Please mention your versions where applicable.

1.5

Netlify CMS version:
Browser version:

Node.JS version:
Operating System:

- Please link or paste your config.yml below if applicable.

@tech4him1
Copy link
Contributor

Possibly related to #1117.

@barthc
Copy link
Contributor

barthc commented Nov 13, 2018

@erquhart can we now close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants