Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onChange event for range picker doesn't work consistently #60

Open
thomhos opened this issue Jul 19, 2017 · 1 comment
Open

onChange event for range picker doesn't work consistently #60

thomhos opened this issue Jul 19, 2017 · 1 comment

Comments

@thomhos
Copy link

thomhos commented Jul 19, 2017

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

  1. Create a datepicker with range config and onChange callback
  2. Hide it using v-if
  3. Show it, and then try to select a date
  4. The onChange is only triggered when the v-if is applied, not when the date is selected

Specifications

  • Version: 1.3.5
  • Platform: Windows
  • Subsystem: Node 6 / npm 3

Implementation

<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>
@goreau
Copy link

goreau commented Oct 20, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants