FIX: pick date and time was not reseting state

This commit is contained in:
Joffrey JAFFEUX 2017-11-23 15:18:27 +01:00 committed by GitHub
parent c5745feac6
commit 5b3ecffbb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -154,14 +154,17 @@ export default ComboBoxComponent.extend(DatetimeMixin, {
},
mutateValue(value) {
if (this.get("isCustom")) return;
let input = null;
const { time } = this._updateAt(value);
if (this.get("isCustom")) {
this.set("value", value);
} else {
let input = null;
const { time } = this._updateAt(value);
if (time && !Ember.isEmpty(value)) {
input = time.format(FORMAT);
if (time && !Ember.isEmpty(value)) {
input = time.format(FORMAT);
}
this.setProperties({ input, value });
}
this.setProperties({ input, value });
},
});