From ad86dc33fc289b06fd406888e9131d6bdc9278e3 Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Wed, 25 Sep 2019 14:23:33 -0400 Subject: [PATCH] Show validation icon only if the date is complete --- js/components/date_selector.js | 3 --- js/test_templates/clin_fields.html | 12 ++++++------ js/test_templates/pop_date_range.html | 12 ++++++------ js/test_templates/to_form.html | 10 +++++----- templates/components/date_picker.html | 4 ++-- templates/components/pop_date_range.html | 8 ++++---- 6 files changed, 23 insertions(+), 26 deletions(-) diff --git a/js/components/date_selector.js b/js/components/date_selector.js index b11a856e..b12d4986 100644 --- a/js/components/date_selector.js +++ b/js/components/date_selector.js @@ -36,7 +36,6 @@ export default { month: this.initialmonth, year: this.initialyear, name: this.nameTag, - showValidation: false, } }, @@ -190,8 +189,6 @@ export default { methods: { onInput: function(e) { - if (this.isDateComplete) this.showValidation = true - emitEvent('field-change', this, { value: this.formattedDate, name: this.name, diff --git a/js/test_templates/clin_fields.html b/js/test_templates/clin_fields.html index 8ac3d44e..a4ffa8ad 100644 --- a/js/test_templates/clin_fields.html +++ b/js/test_templates/clin_fields.html @@ -344,7 +344,7 @@ :optional='false' inline-template> -
+
Start Date @@ -407,7 +407,7 @@
-
+
@@ -443,12 +443,12 @@ :optional='false' inline-template> -
+
End Date
- + @@ -459,7 +459,7 @@

- A CLIN's period of performance must end before . + A CLIN's period of performance must end before September 14, 2022.

@@ -525,7 +525,7 @@ />
-
+
diff --git a/js/test_templates/pop_date_range.html b/js/test_templates/pop_date_range.html index d440fbec..0852802d 100644 --- a/js/test_templates/pop_date_range.html +++ b/js/test_templates/pop_date_range.html @@ -29,7 +29,7 @@ :optional='true' inline-template> -
+
Start Date @@ -92,7 +92,7 @@
-
+
@@ -128,12 +128,12 @@ :optional='true' inline-template> -
+
End Date
- + @@ -144,7 +144,7 @@

- A CLIN's period of performance must end before . + A CLIN's period of performance must end before September 14, 2022.

@@ -210,7 +210,7 @@ />
-
+
diff --git a/js/test_templates/to_form.html b/js/test_templates/to_form.html index 1bbe8fbf..61e2e502 100644 --- a/js/test_templates/to_form.html +++ b/js/test_templates/to_form.html @@ -204,7 +204,7 @@
-
+
Start Date @@ -233,7 +233,7 @@
-
+
@@ -252,7 +252,7 @@
-
+
End Date @@ -260,7 +260,7 @@ @@ -288,7 +288,7 @@
-
+
diff --git a/templates/components/date_picker.html b/templates/components/date_picker.html index 9461f301..165eee64 100644 --- a/templates/components/date_picker.html +++ b/templates/components/date_picker.html @@ -21,7 +21,7 @@ :optional='{{ optional | string | lower }}' inline-template> -
+
{{ label }} @@ -83,7 +83,7 @@
-
+
{{ Icon("ok", classes="icon--green") }}
diff --git a/templates/components/pop_date_range.html b/templates/components/pop_date_range.html index 7fe1aab6..d5431916 100644 --- a/templates/components/pop_date_range.html +++ b/templates/components/pop_date_range.html @@ -36,7 +36,7 @@ :optional='{{ optional | string | lower }}' inline-template> -
+
{{ "task_orders.form.pop_start" | translate }} @@ -99,7 +99,7 @@
-
+
{{ Icon("ok", classes="icon--green") }}
@@ -130,7 +130,7 @@ :optional='{{ optional | string | lower }}' inline-template> -
+
{{ 'task_orders.form.pop_end' | translate }} @@ -192,7 +192,7 @@ />
-
+
{{ Icon("ok", classes="icon--green") }}