Fix bug where name attribute of start date fields was not properly assigned
Fix bug in pop_date_range were startValid and endValid were not being properly updated
This commit is contained in:
parent
d52abeb0a9
commit
843501c00a
@ -46,15 +46,17 @@ export default {
|
|||||||
handleDateChange: function(event) {
|
handleDateChange: function(event) {
|
||||||
if (event.name.includes(START_DATE)) {
|
if (event.name.includes(START_DATE)) {
|
||||||
if (!!event.value) this.startDate = new Date(event.value)
|
if (!!event.value) this.startDate = new Date(event.value)
|
||||||
if (!!event.valid) this.startValid = event.valid
|
if (event.valid != undefined) this.startValid = event.valid
|
||||||
if (this.startValid)
|
if (this.startValid) {
|
||||||
this.minEndDate = this.calcMinEndDate(this.startDate)
|
this.minEndDate = this.calcMinEndDate(this.startDate)
|
||||||
|
}
|
||||||
} else if (event.name.includes(END_DATE)) {
|
} else if (event.name.includes(END_DATE)) {
|
||||||
if (!!event.value) this.endDate = new Date(event.value)
|
if (!!event.value) this.endDate = new Date(event.value)
|
||||||
if (!!event.valid) this.endValid = event.valid
|
if (event.valid != undefined) this.endValid = event.valid
|
||||||
if (this.endValid)
|
if (this.endValid) {
|
||||||
this.maxStartDate = this.calcMaxStartDate(this.endDate)
|
this.maxStartDate = this.calcMaxStartDate(this.endDate)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
calcMaxStartDate: function(date, end = this.contractEnd) {
|
calcMaxStartDate: function(date, end = this.contractEnd) {
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
</legend>
|
</legend>
|
||||||
|
|
||||||
<div class="date-picker-component">
|
<div class="date-picker-component">
|
||||||
<input name="name" v-bind:value="formattedDate" v-on:change="onInput" type="hidden" />
|
<input :name="name" v-bind:value="formattedDate" v-on:change="onInput" type="hidden" />
|
||||||
|
|
||||||
<div class="usa-form-group usa-form-group-month">
|
<div class="usa-form-group usa-form-group-month">
|
||||||
<label>{{ 'components.date_selector.month' | translate }}</label>
|
<label>{{ 'components.date_selector.month' | translate }}</label>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user