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,14 +46,16 @@ export default {
|
||||
handleDateChange: function(event) {
|
||||
if (event.name.includes(START_DATE)) {
|
||||
if (!!event.value) this.startDate = new Date(event.value)
|
||||
if (!!event.valid) this.startValid = event.valid
|
||||
if (this.startValid)
|
||||
if (event.valid != undefined) this.startValid = event.valid
|
||||
if (this.startValid) {
|
||||
this.minEndDate = this.calcMinEndDate(this.startDate)
|
||||
}
|
||||
} else if (event.name.includes(END_DATE)) {
|
||||
if (!!event.value) this.endDate = new Date(event.value)
|
||||
if (!!event.valid) this.endValid = event.valid
|
||||
if (this.endValid)
|
||||
if (event.valid != undefined) this.endValid = event.valid
|
||||
if (this.endValid) {
|
||||
this.maxStartDate = this.calcMaxStartDate(this.endDate)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
||||
</legend>
|
||||
|
||||
<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">
|
||||
<label>{{ 'components.date_selector.month' | translate }}</label>
|
||||
|
Loading…
x
Reference in New Issue
Block a user