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