From eb51fbaa02b648b122b2506ae0306655b7c9488b Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 20 Feb 2020 19:24:03 +0000 Subject: [PATCH] --- ayanova/src/components/date-time-control.vue | 25 ++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/ayanova/src/components/date-time-control.vue b/ayanova/src/components/date-time-control.vue index ac9dc4e2..b0cd88c4 100644 --- a/ayanova/src/components/date-time-control.vue +++ b/ayanova/src/components/date-time-control.vue @@ -158,8 +158,13 @@ export default { ); }, set(value) { + //2017-08-15T12:10:34.4443084+03:00 + var TimePortion = this.timeOnly; + if (!TimePortion) { + TimePortion = "00:00:00"; + } this.date = window.$gz.locale.localTimeDateStringToUTC8601String( - value + "T" + this.timeOnly, + value + "T" + TimePortion, this.timeZoneName ); } @@ -174,8 +179,24 @@ export default { ); }, set(value) { + var DatePortion = this.dateOnly; + if (!DatePortion) { + var v = new Date(); + var fullYear = v.getFullYear(); + var fullMonth = v.getMonth() + 1; + if (fullMonth < 10) { + fullMonth = "0" + fullMonth.toString(); + } + var fullDay = v.getDate(); + if (fullDay < 10) { + fullDay = "0" + fullDay.toString(); + } + + DatePortion = fullYear + "-" + fullMonth + "-" + fullDay; + } + this.date = window.$gz.locale.localTimeDateStringToUTC8601String( - this.dateOnly + "T" + value, + DatePortion + "T" + value, this.timeZoneName ); }