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

rangePlugin causes an error when onChange contains react setState call #2969

Open
SmevSmevson opened this issue Dec 8, 2023 · 0 comments
Open

Comments

@SmevSmevson
Copy link

When using rangePlugin the initial inputs work as expected. When clearing the input the onChange event causes an error when it calls a react setState.
Cannot read properties of undefined (reading 'getTime')

Steps to reproduce

  1. enter the start and end dates
  2. select the start input
  3. Press backspace key

https://stackblitz.com/edit/react-flatpickr-example-not-working-zfkd25?file=src%2FApp.js

Your Environment

  • flatpickr version used: 4.6.13
  • Browser name and version: Google Chrome Version 120.0.6099.62 (Official Build) (arm64)
  • OS and version: macOS 13.4
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

1 participant