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