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 TypeError: $(...).pickatime is not a function #438

Closed
guboi72 opened this issue Dec 17, 2017 · 9 comments
Closed

Uncaught TypeError: $(...).pickatime is not a function #438

guboi72 opened this issue Dec 17, 2017 · 9 comments

Comments

@guboi72
Copy link

guboi72 commented Dec 17, 2017

Hi, I use react and materialize and I can't make the timepicker work. I looked on your site https://react-materialize.github.io/#/forms and you seem to have the same error in console. Can you confirm that you have the same console error.

I use vanilla materialize by importing it from my index.html.

<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script>

@Dyceman
Copy link

Dyceman commented Dec 18, 2017

That happens when the dom element you are trying to access is out of scope. I currently having the same issue trying to close a modal.

@daxaxelrod
Copy link

Dom element being the time picker?
Im using

<Input name="on" type="time" onChange={(e, value) => {

      }} />

@alextrastero
Copy link
Member

Hi, pickatime doesn't work with certain version of materialize-css

@alextrastero
Copy link
Member

required version is "materialize-css": "^0.100.2",

@daxaxelrod
Copy link

@alextrastero Thanks!

@jakecurreri
Copy link

Same issue. Using "materialize-css": "^1.0.0-rc.2".

@alextrastero
Copy link
Member

Please downgrade to materialize-css@0.100.2

@jakecurreri
Copy link

No such luck. Remains to receive a $(...).pickatime is not a function.

package.json
"materialize-css": "^0.100.2"
...
"react-materialize": "^2.4.2"

app head
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script>

@alextrastero
Copy link
Member

Are you using create-react-app?
Check out this repo example: https://github.com/alextrastero/react-materialize-cra-example

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

5 participants