I have an angular front end with D8 backend. I am populating a content type that has a Date field. I am successfully creating the content-type with the all its fields including the Date field. The format I am sending via POST looks like 2017-07-07
. It gets saved and I can even retrieve the data.
The problem is when I edit or view the node via drupal admin, the date field is empty. If I devel the node, the value I sent is set on the field. It just will not display via in drupal. What format should I be sending the date field so it will save and populate the form.
In JS, I am sending the date like so:
var start = new Date();
var params = {
start: {value: start.getFullYear() + '-' + (start.getMonth() + 1) + '-' + start.getDate()}
};
$http.post(API + 'entity/node', params); //etc
GET
on that node via REST, what does the structure of the date field look like?2017-07-21T18:11:11
field_start
...?"field_start":[{"value":"2017-07-21T18:11:11"}]
?