This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
/* eslint-disable */
|
||||
export default {
|
||||
beforeCreate() {
|
||||
|
||||
//debugger;
|
||||
//check pre-requisites exist just in case
|
||||
if (this.$gzdevmode()) {
|
||||
if (!this.$dayjs) {
|
||||
@@ -107,7 +107,6 @@ export default {
|
||||
: "";
|
||||
},
|
||||
formatDate() {
|
||||
|
||||
return this.value
|
||||
? this.$dayjs
|
||||
.utc(this.value)
|
||||
@@ -124,15 +123,24 @@ export default {
|
||||
: "";
|
||||
},
|
||||
dateOnly: {
|
||||
|
||||
get() {
|
||||
|
||||
return this.$dayjs
|
||||
.utc(this.value)
|
||||
//debugger;
|
||||
var defaultDateString = this.$dayjs()
|
||||
.utc()
|
||||
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.format("YYYY-MM-DD");
|
||||
|
||||
return this.value
|
||||
? this.$dayjs
|
||||
.utc(this.value)
|
||||
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.format("YYYY-MM-DD")
|
||||
: defaultDateString;
|
||||
},
|
||||
set(value) {
|
||||
//debugger;
|
||||
//TODO: This needs to handle a null / empty this.timeOnly here by maybe defaulting to right now
|
||||
|
||||
this.date = this.$dayjs
|
||||
.utc(value + " " + this.timeOnly)
|
||||
.subtract(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
@@ -141,12 +149,22 @@ export default {
|
||||
},
|
||||
timeOnly: {
|
||||
get() {
|
||||
return this.$dayjs
|
||||
.utc(this.value)
|
||||
var defaultTimeString = this.$dayjs
|
||||
.utc()
|
||||
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.format("HH:mm:ss");
|
||||
|
||||
return this.value
|
||||
? this.$dayjs
|
||||
.utc(this.value)
|
||||
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.format("HH:mm:ss")
|
||||
: defaultTimeString;
|
||||
},
|
||||
set(value) {
|
||||
//debugger;
|
||||
//TODO: This needs to handle a null / empty this.dateOnly here by maybe defaulting to right now
|
||||
|
||||
this.date = this.$dayjs
|
||||
.utc(this.dateOnly + " " + value)
|
||||
.subtract(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
|
||||
Reference in New Issue
Block a user