From 0c54b61579337dade28177a332cf64f3995909c8 Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Thu, 26 Sep 2019 16:19:30 -0400 Subject: [PATCH] Remove watch from date selector component --- js/components/date_selector.js | 5 ----- js/test_templates/clin_fields.html | 8 ++------ js/test_templates/pop_date_range.html | 6 ++---- js/test_templates/to_form.html | 6 +++--- templates/components/clin_fields.html | 4 ++-- templates/components/date_picker.html | 2 -- templates/components/pop_date_range.html | 4 +--- 7 files changed, 10 insertions(+), 25 deletions(-) diff --git a/js/components/date_selector.js b/js/components/date_selector.js index 20aa6f7b..2717c033 100644 --- a/js/components/date_selector.js +++ b/js/components/date_selector.js @@ -20,10 +20,6 @@ export default { mindate: { type: String }, maxdate: { type: String }, nameTag: { type: String }, - watch: { - type: Boolean, - default: false, - }, optional: { type: Boolean, default: true, @@ -201,7 +197,6 @@ export default { emitEvent('field-change', this, { value: this.formattedDate, name: this.name, - watch: this.watch, valid: this.isDateValid, }) diff --git a/js/test_templates/clin_fields.html b/js/test_templates/clin_fields.html index 15d3027a..57fefe2c 100644 --- a/js/test_templates/clin_fields.html +++ b/js/test_templates/clin_fields.html @@ -311,8 +311,6 @@ - - @@ -401,8 +398,8 @@ maxlength="4" type="number" v-model="year" - max="" - min="" + max="2022" + min="2019" v-on:change="onInput" /> @@ -440,7 +437,6 @@ initialday="" initialyear="" - v-bind:watch='true' :optional='false' v-on:date-change='handleDateChange' inline-template> diff --git a/js/test_templates/pop_date_range.html b/js/test_templates/pop_date_range.html index 1c70e5e9..2d53ad9b 100644 --- a/js/test_templates/pop_date_range.html +++ b/js/test_templates/pop_date_range.html @@ -25,7 +25,6 @@ initialday="" initialyear="" - v-bind:watch='false' :optional='true' v-on:date-change='handleDateChange' inline-template> @@ -86,8 +85,8 @@ maxlength="4" type="number" v-model="year" - max="" - min="" + max="2022" + min="2019" v-on:change="onInput" /> @@ -125,7 +124,6 @@ initialday="" initialyear="" - v-bind:watch='false' :optional='true' v-on:date-change='handleDateChange' inline-template> diff --git a/js/test_templates/to_form.html b/js/test_templates/to_form.html index 6d091370..a22dc16f 100644 --- a/js/test_templates/to_form.html +++ b/js/test_templates/to_form.html @@ -203,7 +203,7 @@
- +
@@ -231,7 +231,7 @@
- +
@@ -251,7 +251,7 @@
- +
diff --git a/templates/components/clin_fields.html b/templates/components/clin_fields.html index 2baf6419..94ca2a5b 100644 --- a/templates/components/clin_fields.html +++ b/templates/components/clin_fields.html @@ -129,9 +129,9 @@
{% if fields %} - {{ PopDateRange(start_field=fields.start_date, end_field=fields.end_date, watch=True, optional=False, mindate=contract_start, maxdate=contract_end) }} + {{ PopDateRange(start_field=fields.start_date, end_field=fields.end_date, optional=False, mindate=contract_start, maxdate=contract_end) }} {% else %} - {{ PopDateRange(watch=True, optional=False, mindate=contract_start, maxdate=contract_end) }} + {{ PopDateRange(optional=False, mindate=contract_start, maxdate=contract_end) }} {% endif %}
diff --git a/templates/components/date_picker.html b/templates/components/date_picker.html index 165eee64..0a40f1bd 100644 --- a/templates/components/date_picker.html +++ b/templates/components/date_picker.html @@ -7,7 +7,6 @@ description=field.description, mindate=None, maxdate=None, - watch=False, optional=True) -%} diff --git a/templates/components/pop_date_range.html b/templates/components/pop_date_range.html index bde27736..676c7c69 100644 --- a/templates/components/pop_date_range.html +++ b/templates/components/pop_date_range.html @@ -1,7 +1,7 @@ {% from 'components/alert.html' import Alert %} {% from 'components/icon.html' import Icon %} -{% macro PopDateRange(start_field=None, end_field=None, mindate=mindate, maxdate=maxdate, watch=False, optional=True, index=None) %} +{% macro PopDateRange(start_field=None, end_field=None, mindate=mindate, maxdate=maxdate, optional=True, index=None) %} @@ -127,7 +126,6 @@ {% else %} :name-tag="'clins-' + clinIndex + '-end_date'" {% endif %} - v-bind:watch='{{ watch | string | lower }}' :optional='{{ optional | string | lower }}' v-on:date-change='handleDateChange' inline-template>