Open thomhos opened 7 years ago
When passing { onChange: onChangeHandler } as config options, I expect the onChange to be called everytime something changes.
The onChange is called when the datepicker is made visible using v-if. Changes to the actual date range selected do not trigger an onChange.
<div class="field has-addons" v-if="customRange"> <div class="control control--datepicker has-icons-right"> <datepicker placeholder="Select a range" :config="{ mode: 'range', maxDate: 'today', onChange: setCustomRangeDates }"></datepicker> <span class="icon is-small is-right"> <i class="fa fa-calendar"></i> </span> </div> <div class="control"> <button class="button is-info" @click="submitCustomRange"> Search </button> </div> </div>
Same behavior using two controls on same page. Only the first one selected fires the correspondent onChange. To reproduce, just insert two controls on same page
Expected Behavior
When passing { onChange: onChangeHandler } as config options, I expect the onChange to be called everytime something changes.
Actual Behavior
The onChange is called when the datepicker is made visible using v-if. Changes to the actual date range selected do not trigger an onChange.
Steps to Reproduce the Problem
Specifications
Implementation