This commit is contained in:
2020-06-20 20:30:44 +00:00
parent 40f12a6cc1
commit e87698f6a4

View File

@@ -47,16 +47,8 @@ export default {
}; };
}, },
watch: { watch: {
// internalValue(value) {
// setValue(this.$refs.textField.$refs.input, value);
// }
value(val) { value(val) {
// console.log("watch:value val is ", val);
// console.log("watch:value this.dateValue is ", this.dateValue);
this.internalValue = val; this.internalValue = val;
// console.log("aft watch:value val is ", val);
// console.log("aft watch:value this.dateValue is ", this.dateValue);
// this.timeValue = this.value;
} }
}, },
props: { props: {
@@ -91,15 +83,16 @@ export default {
this.internalValue, this.internalValue,
this.timeZoneName this.timeZoneName
); );
if (!TimePortion) {
TimePortion = "00:00:00";
}
let newValue = window.$gz.locale.localTimeDateStringToUTC8601String( let newValue = window.$gz.locale.localTimeDateStringToUTC8601String(
value + "T" + TimePortion, value + "T" + TimePortion,
this.timeZoneName this.timeZoneName
); );
this.$emit("input", newValue); this.$emit("input", newValue);
}, },
handleTimeInput(value) { handleTimeInput(value) {
console.log("handle time input called with ", value);
let DatePortion = window.$gz.locale.utcDateStringToLocal8601DateOnlyString( let DatePortion = window.$gz.locale.utcDateStringToLocal8601DateOnlyString(
this.internalValue, this.internalValue,
this.timeZoneName this.timeZoneName
@@ -115,18 +108,13 @@ export default {
if (fullDay < 10) { if (fullDay < 10) {
fullDay = "0" + fullDay.toString(); fullDay = "0" + fullDay.toString();
} }
DatePortion = fullYear + "-" + fullMonth + "-" + fullDay; DatePortion = fullYear + "-" + fullMonth + "-" + fullDay;
} }
let newValue = window.$gz.locale.localTimeDateStringToUTC8601String( let newValue = window.$gz.locale.localTimeDateStringToUTC8601String(
DatePortion + "T" + value, DatePortion + "T" + value,
this.timeZoneName this.timeZoneName
); );
//console.log("handle input emitting ", newValue);
this.$emit("input", newValue); this.$emit("input", newValue);
// // this.internalValue = value;
// // this.formattedValue = value;
} }
} }
}; };