This commit is contained in:
2022-02-04 00:38:56 +00:00
parent 8c1ed95cb5
commit afab91a2e1
3 changed files with 22 additions and 0 deletions

View File

@@ -20,6 +20,7 @@
<v-date-picker
:value="dateValue"
:locale="languageName"
show-adjacent-months
@input="updateDateValue"
>
<v-btn text color="primary" @click="$emit('input', null)">{{

View File

@@ -21,6 +21,7 @@
<v-date-picker
:value="dateValue"
:locale="languageName"
show-adjacent-months
@input="updateDateValue"
>
<v-btn text color="primary" @click="$emit('input', null)">{{
@@ -157,14 +158,31 @@ export default {
},
methods: {
setToday() {
var tmp = window.$gz.DateTime.local()
.setZone(this.timeZoneName)
.toUTC()
.toString();
console.log(tmp);
// console.log("setToday", {
// tz: this.timeZoneName,
// now: window.$gz.locale.nowUTC8601String(this.timeZoneName)
// });
const v = window.$gz.locale
.nowUTC8601String(this.timeZoneName)
.split("T")[0];
//console.log("end result:", v);
this.updateDateValue(v);
this.dlgdate = false;
},
setNow() {
// console.log("setNow", {
// tz: this.timeZoneName,
// now: window.$gz.locale.nowUTC8601String(this.timeZoneName)
// });
const v = window.$gz.locale.nowUTC8601String().split("T")[1];
//console.log("end result:", v);
this.updateTimeValue(v);
this.dlgtime = false;
},