This commit is contained in:
2020-07-14 13:49:10 +00:00
parent 4a9ea06186
commit e9e2a94a4c

View File

@@ -96,18 +96,35 @@ export default {
updateValue() {
let vm = this;
let dateValue = vm.$refs.dateField.$refs.input.value;
console.log(
"date-time-control::updateValue var datevalue is:",
dateValue
);
// let DatePortion = window.$gz.locale.utcDateStringToLocal8601DateOnlyString(
// dateValue,
// vm.timeZoneName
// );
let DatePortion = dateValue;
// let dateValue = vm.$refs.dateField.$refs.input.value;
// let DatePortion = dateValue;
// if (!DatePortion) {
// let v = new Date();
// let fullYear = v.getFullYear();
// let fullMonth = v.getMonth() + 1;
// if (fullMonth < 10) {
// fullMonth = "0" + fullMonth.toString();
// }
// let fullDay = v.getDate();
// if (fullDay < 10) {
// fullDay = "0" + fullDay.toString();
// }
// DatePortion = fullYear + "-" + fullMonth + "-" + fullDay;
// }
if (!DatePortion) {
// let timeValue = vm.$refs.timeField.$refs.input.value;
// let TimePortion = timeValue;
// if (!TimePortion) {
// TimePortion = "00:00:00";
// }
// let ret = window.$gz.locale.localTimeDateStringToUTC8601String(
// DatePortion + "T" + TimePortion,
// this.timeZoneName
// );
let dateValue = vm.$refs.dateField.$refs.input.value;
if (!dateValue) {
let v = new Date();
let fullYear = v.getFullYear();
let fullMonth = v.getMonth() + 1;
@@ -118,33 +135,18 @@ export default {
if (fullDay < 10) {
fullDay = "0" + fullDay.toString();
}
DatePortion = fullYear + "-" + fullMonth + "-" + fullDay;
dateValue = fullYear + "-" + fullMonth + "-" + fullDay;
}
let timeValue = vm.$refs.timeField.$refs.input.value;
console.log(
"date-time-control::updateValue var timevalue is:",
timeValue
);
// let TimePortion = window.$gz.locale.utcDateStringToLocal8601TimeOnlyString(
// timeValue,
// vm.timeZoneName
// );
let TimePortion = timeValue;
if (!TimePortion) {
TimePortion = "00:00:00";
if (!timeValue) {
timeValue = "00:00:00";
}
// console.log(
// "date-time-control::updateValue var timeportion is:",
// TimePortion
// );
let ret = window.$gz.locale.localTimeDateStringToUTC8601String(
DatePortion + "T" + TimePortion,
dateValue + "T" + timeValue,
this.timeZoneName
);
console.log("date-time-control::updateValue emitting:", ret);
this.$emit("input", ret);
}
}