Closed
Description
Bug
fieldInput.vue
formatValueToModel(value) {
if (value != null) {
if (this.schema.inputType === "date" ||
this.schema.inputType === "datetime" ||
this.schema.inputType === "datetimelocal") {
return new Date(value).getTime();
}
}
return value;
}
datetimelocal
is incorrectshould be datetime-local
Also, I found that new Date(value)
in chrome will treat the value as UTC if it has a 'T', but instead it is 'local without timezone', so the value returned will be wrong. don't know if other browsers would do the same: https://jsfiddle.net/setn3460/
So I suggest using Moment as it returns consistent values