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

Uncaught Error: Element type is invalid #220

Open
oosby opened this issue Feb 1, 2024 · 0 comments
Open

Uncaught Error: Element type is invalid #220

oosby opened this issue Feb 1, 2024 · 0 comments

Comments

@oosby
Copy link

oosby commented Feb 1, 2024

I'm using react-flatpickr in a functional react component and getting the following error in the browser
Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
This is how it's implemented:

function MyApp() {
...
return (
      <Flatpickr
        className={classes}
        value={date}
        options={options}
        onChange={handleChange}
        onOpen={handleOpen}
        onClose={handleClose}
      >
        <input type='text' data-input placeholder={placeholder} />
        <button type='button' data-toggle className='calendar-icon'>
        </button>
      </Flatpickr>
   )}
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