HUGE REFACTOR / CLEANUP
if there is a issue it's probably something in here that was changed
This commit is contained in:
@@ -57,17 +57,14 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
/* Xeslint-disable */
|
||||
//NOTE: this control also captures the date even though it's time only
|
||||
//this is an intentional design decision to support field change to date or date AND time and is considered a display issue
|
||||
export default {
|
||||
data: () => ({
|
||||
dlgtime: false,
|
||||
//cache display format stuff
|
||||
timeZoneName: window.$gz.locale.getResolvedTimeZoneName(),
|
||||
languageName: window.$gz.locale.getResolvedLanguage(),
|
||||
hour12: window.$gz.locale.getHour12()
|
||||
// defaultLocale: window.$gz.locale.g etBrowserFirstLanguage().split("-", 1)[0]
|
||||
}),
|
||||
props: {
|
||||
label: { type: String, default: null },
|
||||
@@ -97,7 +94,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
setNow() {
|
||||
let v = window.$gz.locale
|
||||
const v = window.$gz.locale
|
||||
.nowUTC8601String(this.timeZoneName)
|
||||
.split("T")[1];
|
||||
this.updateTimeValue(v);
|
||||
@@ -123,11 +120,11 @@ export default {
|
||||
this.updateValue(this.dateValue, v);
|
||||
},
|
||||
updateValue(theDate, theTime) {
|
||||
let vm = this;
|
||||
const vm = this;
|
||||
|
||||
if (!theDate) {
|
||||
let v = new Date();
|
||||
let fullYear = v.getFullYear();
|
||||
const v = new Date();
|
||||
const fullYear = v.getFullYear();
|
||||
let fullMonth = v.getMonth() + 1;
|
||||
if (fullMonth < 10) {
|
||||
fullMonth = "0" + fullMonth.toString();
|
||||
@@ -138,12 +135,10 @@ export default {
|
||||
}
|
||||
theDate = fullYear + "-" + fullMonth + "-" + fullDay;
|
||||
}
|
||||
|
||||
if (!theTime) {
|
||||
theTime = "00:00:00";
|
||||
}
|
||||
|
||||
let ret = window.$gz.locale.localTimeDateStringToUTC8601String(
|
||||
const ret = window.$gz.locale.localTimeDateStringToUTC8601String(
|
||||
theDate + "T" + theTime,
|
||||
vm.timeZoneName
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user