This commit is contained in:
@@ -2,16 +2,43 @@
|
|||||||
<div>
|
<div>
|
||||||
<template v-if="!readonly">
|
<template v-if="!readonly">
|
||||||
<v-text-field
|
<v-text-field
|
||||||
ref="dateField"
|
v-if="showDays"
|
||||||
:value="days"
|
:value="days"
|
||||||
@input="handleInput"
|
@input="handleDaysInput"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:label="$ay.t('TimeSpanDays')"
|
:label="$ay.t('TimeSpanDays')"
|
||||||
type="number"
|
type="number"
|
||||||
:num
|
|
||||||
:data-cy="!!$ay.dev ? 'durationdays:' + testId : false"
|
:data-cy="!!$ay.dev ? 'durationdays:' + testId : false"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
|
<v-text-field
|
||||||
|
:value="hours"
|
||||||
|
@input="handleHoursInput"
|
||||||
|
:readonly="readonly"
|
||||||
|
:disabled="disabled"
|
||||||
|
:label="$ay.t('TimeSpanHours')"
|
||||||
|
type="number"
|
||||||
|
:data-cy="!!$ay.dev ? 'durationhours:' + testId : false"
|
||||||
|
></v-text-field>
|
||||||
|
<v-text-field
|
||||||
|
:value="minutes"
|
||||||
|
@input="handleMinutesInput"
|
||||||
|
:readonly="readonly"
|
||||||
|
:disabled="disabled"
|
||||||
|
:label="$ay.t('TimeSpanMinutes')"
|
||||||
|
type="number"
|
||||||
|
:data-cy="!!$ay.dev ? 'durationminutes:' + testId : false"
|
||||||
|
></v-text-field>
|
||||||
|
<v-text-field
|
||||||
|
v-if="showSeconds"
|
||||||
|
:value="seconds"
|
||||||
|
@input="handleSecondsInput"
|
||||||
|
:readonly="readonly"
|
||||||
|
:disabled="disabled"
|
||||||
|
:label="$ay.t('TimeSpanSeconds')"
|
||||||
|
type="number"
|
||||||
|
:data-cy="!!$ay.dev ? 'durationseconds:' + testId : false"
|
||||||
|
></v-text-field>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
@@ -87,13 +114,17 @@ export default {
|
|||||||
this.hour12
|
this.hour12
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
handleDaysInput(value) {},
|
handleDaysInput(value) {
|
||||||
|
this.days = Number(value);
|
||||||
|
this.handleInput();
|
||||||
|
},
|
||||||
handleHoursInput(value) {
|
handleHoursInput(value) {
|
||||||
if (Number(value) > 24) {
|
if (Number(value) > 24) {
|
||||||
this.days = 24;
|
this.hours = 24;
|
||||||
} else {
|
} else {
|
||||||
this.days = Number(value);
|
this.hours = Number(value);
|
||||||
}
|
}
|
||||||
|
this.handleInput();
|
||||||
//oninput="if(Number(this.value) > Number(this.max)) this.value = this.max;"
|
//oninput="if(Number(this.value) > Number(this.max)) this.value = this.max;"
|
||||||
},
|
},
|
||||||
handleMinutesInput(value) {
|
handleMinutesInput(value) {
|
||||||
@@ -102,6 +133,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.minutes = Number(value);
|
this.minutes = Number(value);
|
||||||
}
|
}
|
||||||
|
this.handleInput();
|
||||||
},
|
},
|
||||||
handleSecondsInput(value) {
|
handleSecondsInput(value) {
|
||||||
if (Number(value) > 60) {
|
if (Number(value) > 60) {
|
||||||
@@ -109,7 +141,9 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.seconds = Number(value);
|
this.seconds = Number(value);
|
||||||
}
|
}
|
||||||
}
|
this.handleInput();
|
||||||
|
},
|
||||||
|
handleInput() {}
|
||||||
//combine these into the proper timespan string
|
//combine these into the proper timespan string
|
||||||
// //combine the time and dates into a consolidated value
|
// //combine the time and dates into a consolidated value
|
||||||
// let TimePortion = window.$gz.locale.utcDateStringToLocal8601TimeOnlyString(
|
// let TimePortion = window.$gz.locale.utcDateStringToLocal8601TimeOnlyString(
|
||||||
|
|||||||
Reference in New Issue
Block a user