diff --git a/front/core/components/input-time/index.js b/front/core/components/input-time/index.js index d77ccbec2..0d01fbd32 100644 --- a/front/core/components/input-time/index.js +++ b/front/core/components/input-time/index.js @@ -23,12 +23,15 @@ export default class InputTime extends Field { let date = null; let value = this.input.value; + if (this.field && !this.modelDate) + this.modelDate = this.field; + if (value) { let split = value.split(':').map(i => parseInt(i) || null); - date = this.field instanceof Date - ? this.field - : new Date(this.field || null); + date = this.modelDate + ? new Date(this.modelDate) + : new Date(); date.setHours(split[0], split[1], 0, 0); } diff --git a/modules/route/front/basic-data/index.html b/modules/route/front/basic-data/index.html index d3ba25b11..737bbab13 100644 --- a/modules/route/front/basic-data/index.html +++ b/modules/route/front/basic-data/index.html @@ -21,7 +21,7 @@