fix(vnInputTime): quit new date(null)
gitea/salix/pipeline/head Something is wrong with the build of this commit
Details
gitea/salix/pipeline/head Something is wrong with the build of this commit
Details
This commit is contained in:
parent
24f87afa51
commit
d3852bac5d
|
@ -23,12 +23,15 @@ export default class InputTime extends Field {
|
||||||
let date = null;
|
let date = null;
|
||||||
let value = this.input.value;
|
let value = this.input.value;
|
||||||
|
|
||||||
|
if (this.field && !this.modelDate)
|
||||||
|
this.modelDate = this.field;
|
||||||
|
|
||||||
if (value) {
|
if (value) {
|
||||||
let split = value.split(':').map(i => parseInt(i) || null);
|
let split = value.split(':').map(i => parseInt(i) || null);
|
||||||
|
|
||||||
date = this.field instanceof Date
|
date = this.modelDate
|
||||||
? this.field
|
? new Date(this.modelDate)
|
||||||
: new Date(this.field || null);
|
: new Date();
|
||||||
date.setHours(split[0], split[1], 0, 0);
|
date.setHours(split[0], split[1], 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "salix-back",
|
"name": "salix-back",
|
||||||
"version": "8.6.0",
|
"version": "8.8.0",
|
||||||
"author": "Verdnatura Levante SL",
|
"author": "Verdnatura Levante SL",
|
||||||
"description": "Salix backend",
|
"description": "Salix backend",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
|
Loading…
Reference in New Issue