Skip to content

Multiple Flatpickr components share onChange events? #258

Description

@robertaird

I'm attempting to migrate react-flatpickr from v3 to v4. On one of our pages we have two flatpickr components acting as time inputs, and on v4 when we update one input the other is updated with the same value. When the other is clicked the previous value is still visible. Clicking away results in both values updating to that value.

I've reproduced this in codesandbox to demonstrate.

Passing the change handler via options instead of using the onChange prop seems to fix this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions