Closed alansemenov closed 4 years ago
Content type schema:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <content-type> <display-name>Date</display-name> <super-type>base:structured</super-type> <form> <input name="date" type="Date"> <label>Date</label> <indexed>true</indexed> <occurrences minimum="1" maximum="1"/> <default>2000-01-01</default> </input> </form> </content-type>
Create new content of this type:
var contentLib = require('/lib/xp/content'); var content = contentLib.create({ name: 'myContent', parentPath: '/', displayName: 'My Content', contentType: 'com.enonic.app.mytype:date', data: { "date": "2020-06-02" } });
Here we explicitly say that the new content should have value 2020-06-02 in the date field, but content is still created with default value 2000-01-01
date
NB! Check if we have this problem for other input types where we support default values as well.
I verified this bug manually. I am planning to add ui-test for this bug
Content type schema:
Create new content of this type:
Here we explicitly say that the new content should have value 2020-06-02 in the
date
field, but content is still created with default value 2000-01-01