summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSurya Venkatesan <suryav@ami.com>2024-09-25 09:29:49 +0300
committerSurya Venkatesan <suryav@ami.com>2024-09-30 16:17:19 +0300
commit5996b3df28f8f8cbb4b97417ad1e3972139c09a6 (patch)
treec6c2655925184d5caade333cdcc31f6d23321f6d
parent249ee339f5a16bb6bf9a6f3992621f73cfc98236 (diff)
downloadwebui-vue-5996b3df28f8f8cbb4b97417ad1e3972139c09a6.tar.xz
Date and time page helper issue
Invalid feedback element if condition change, Helper import change in date time page and table date filter global component. Change-Id: I1f01943229b78d4dff36f3905fe3781ba696d528 Signed-off-by: Surya Venkatesan <suryav@ami.com>
-rw-r--r--src/components/Global/TableDateFilter.vue2
-rw-r--r--src/views/Settings/DateTime/DateTime.vue13
2 files changed, 8 insertions, 7 deletions
diff --git a/src/components/Global/TableDateFilter.vue b/src/components/Global/TableDateFilter.vue
index e9f2f72a..a712f1c9 100644
--- a/src/components/Global/TableDateFilter.vue
+++ b/src/components/Global/TableDateFilter.vue
@@ -99,7 +99,7 @@
<script>
import IconCalendar from '@carbon/icons-vue/es/calendar/20';
-import { helpers } from '@vuelidate/validators';
+import { helpers } from 'vuelidate/lib/validators';
import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js';
import { useVuelidate } from '@vuelidate/core';
import { useI18n } from 'vue-i18n';
diff --git a/src/views/Settings/DateTime/DateTime.vue b/src/views/Settings/DateTime/DateTime.vue
index b86ebd22..4475a55e 100644
--- a/src/views/Settings/DateTime/DateTime.vue
+++ b/src/views/Settings/DateTime/DateTime.vue
@@ -63,10 +63,10 @@
@blur="v$.form.manual.date.$touch()"
/>
<b-form-invalid-feedback role="alert">
- <div v-if="!v$.form.manual.date.pattern">
+ <div v-if="v$.form.manual.date.pattern.$invalid">
{{ $t('global.form.invalidFormat') }}
</div>
- <div v-if="!v$.form.manual.date.required">
+ <div v-if="v$.form.manual.date.required.$invalid">
{{ $t('global.form.fieldRequired') }}
</div>
</b-form-invalid-feedback>
@@ -111,10 +111,10 @@
@blur="v$.form.manual.time.$touch()"
/>
<b-form-invalid-feedback role="alert">
- <div v-if="!v$.form.manual.time.pattern">
+ <div v-if="v$.form.manual.time.pattern.$invalid">
{{ $t('global.form.invalidFormat') }}
</div>
- <div v-if="!v$.form.manual.time.required">
+ <div v-if="v$.form.manual.time.required.$invalid">
{{ $t('global.form.fieldRequired') }}
</div>
</b-form-invalid-feedback>
@@ -145,7 +145,7 @@
@blur="v$.form.ntp.firstAddress.$touch()"
/>
<b-form-invalid-feedback role="alert">
- <div v-if="!v$.form.ntp.firstAddress.required">
+ <div v-if="v$.form.ntp.firstAddress.required.$invalid">
{{ $t('global.form.fieldRequired') }}
</div>
</b-form-invalid-feedback>
@@ -209,7 +209,8 @@ import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js';
import { useVuelidate } from '@vuelidate/core';
import { mapState } from 'vuex';
-import { requiredIf, helpers } from '@vuelidate/validators';
+import { requiredIf } from '@vuelidate/validators';
+import { helpers } from 'vuelidate/lib/validators';
import { useI18n } from 'vue-i18n';
const isoDateRegex = /([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))/;