This commit is contained in:
@@ -93,7 +93,34 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
value(val) {
|
||||
this.internalValue = val;
|
||||
//this.internalValue = val;
|
||||
if (val == null) {
|
||||
this.days = 0;
|
||||
this.hours = 0;
|
||||
this.minutes = 0;
|
||||
this.seconds = 0;
|
||||
return;
|
||||
}
|
||||
let work = val.split(":");
|
||||
//has days?
|
||||
if (work[0].includes(".")) {
|
||||
let dh = work[0].split(".");
|
||||
this.days = Number(dh[0]);
|
||||
this.hours = Number(dh[1]);
|
||||
} else {
|
||||
this.days = 0;
|
||||
this.hours = Number(work[0]);
|
||||
}
|
||||
|
||||
this.minutes = Number(work[1]);
|
||||
|
||||
//has milliseconds? (ignore them)
|
||||
if (work[2].includes(".")) {
|
||||
let dh = work[2].split(".");
|
||||
this.seconds = Number(dh[0]);
|
||||
} else {
|
||||
this.seconds = Number(work[2]);
|
||||
}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@@ -159,7 +186,28 @@ export default {
|
||||
}
|
||||
this.handleInput();
|
||||
},
|
||||
handleInput() {}
|
||||
handleInput() {
|
||||
//{"data":{"testTSDaysWMS":"22.10:15:22.0330000","testTSHMS":"05:16:33","testTS_DHMS":"5.10:15:33","testTS_MS":"00:15:33","testTS_S":"00:00:33","testTS_D":"22.00:00:00"}}
|
||||
// DD.HH:MM:SS.ms
|
||||
let ret = "";
|
||||
let vm = this;
|
||||
if (vm.days && vm.days > 0) {
|
||||
ret = `${vm.days}.`;
|
||||
}
|
||||
|
||||
if (!vm.hours) {
|
||||
vm.hours = 0;
|
||||
}
|
||||
if (!vm.minutes) {
|
||||
vm.minutes = 0;
|
||||
}
|
||||
|
||||
if (!vm.seconds) {
|
||||
vm.seconds = 0;
|
||||
}
|
||||
ret += `${vm.hours}:${vm.minutes}:${vm.seconds}`;
|
||||
this.$emit("input", ret);
|
||||
}
|
||||
//combine these into the proper timespan string
|
||||
// //combine the time and dates into a consolidated value
|
||||
// let TimePortion = window.$gz.locale.utcDateStringToLocal8601TimeOnlyString(
|
||||
|
||||
@@ -46,8 +46,7 @@
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('NotifySubscriptionPendingSpan')"
|
||||
:showSeconds="true"
|
||||
:error="'This is an error message'"
|
||||
:showSeconds="false"
|
||||
ref="advanceNotice"
|
||||
:data-cy="!!$ay.dev ? 'advanceNotice' : false"
|
||||
:error-messages="form().serverErrors(this, 'advanceNotice')"
|
||||
|
||||
Reference in New Issue
Block a user