JSFiddle - React, Tailwind, and code Playground
JavaScript
enyo.create({
components: [{
kind:'onyx.DatePicker',
name:'datePicker'
}],
rendered: function () {
this.inherited(arguments);
var dirty_date = new Date('1990-01-01');
var clean_date = new Date(dirty_date.getTime() + dirty_date.getTimezoneOffset() * 60000);
this.$.datePicker.setValue(clean_date);
console.log(this.$.datePicker.getValue().toISOString().slice(0,10));
}
}).renderInto(document.body);