This commit is contained in:
@@ -101,37 +101,37 @@ export default {
|
||||
return this.value
|
||||
? this.$dayjs
|
||||
.utc(this.value)
|
||||
.add(this.$gzlocale.timeZoneOffset, "hour")
|
||||
.format(this.$gzlocale.formats.shortDateAndTime)
|
||||
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.format(this.$gzlocale.format().shortDateAndTime)
|
||||
: "";
|
||||
},
|
||||
formatDate() {
|
||||
return this.value
|
||||
? this.$dayjs
|
||||
.utc(this.value)
|
||||
.add(this.$gzlocale.timeZoneOffset, "hour")
|
||||
.format(this.$gzlocale.formats.shortDate)
|
||||
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.format(this.$gzlocale.format().shortDate)
|
||||
: "";
|
||||
},
|
||||
formatTime() {
|
||||
return this.value
|
||||
? this.$dayjs
|
||||
.utc(this.value)
|
||||
.add(this.$gzlocale.timeZoneOffset, "hour")
|
||||
.format(this.$gzlocale.formats.shortTime)
|
||||
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.format(this.$gzlocale.format().shortTime)
|
||||
: "";
|
||||
},
|
||||
dateOnly: {
|
||||
get() {
|
||||
return this.$dayjs
|
||||
.utc(this.value)
|
||||
.add(this.$gzlocale.timeZoneOffset, "hour")
|
||||
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.format("YYYY-MM-DD");
|
||||
},
|
||||
set(value) {
|
||||
this.date = this.$dayjs
|
||||
.utc(value + " " + this.timeOnly)
|
||||
.subtract(this.$gzlocale.timeZoneOffset, "hour")
|
||||
.subtract(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.toISOString();
|
||||
}
|
||||
},
|
||||
@@ -139,13 +139,13 @@ export default {
|
||||
get() {
|
||||
return this.$dayjs
|
||||
.utc(this.value)
|
||||
.add(this.$gzlocale.timeZoneOffset, "hour")
|
||||
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.format("HH:mm:ss");
|
||||
},
|
||||
set(value) {
|
||||
this.date = this.$dayjs
|
||||
.utc(this.dateOnly + " " + value)
|
||||
.subtract(this.$gzlocale.timeZoneOffset, "hour")
|
||||
.subtract(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.toISOString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user