TW-Elements
TW-Elements copied to clipboard
[datepicker][jQueryInterface not defined]
Describe the bug
I was using tailwind-element
in a laravel
project with blade
, datetimepicker
worked well but datepicker
and timepicker
, i found it was jQueryInterface
method
Expected behavior no errors
Actual behavior console threw errors
app-9570ed77.js:268 Uncaught TypeError: Cannot set properties of undefined (setting 'Constructor')
Show your code
# app.js
import { Modal, Toast, Ripple, Input, Select, Datepicker, Datetimepicker, initTE } from "tw-elements";
initTE({ Modal, Toast, Ripple, Datepicker, Datetimepicker, Input, Select });
Desktop (please complete the following information):
- OS: macOS 11.7.9
- Browser chrome
- Version 115.0.5790.98
Hi, why do you think its jQueryInterface method causing that? Did you follow our laravel integration tutorial? https://tailwind-elements.com/docs/standard/integrations/laravel-integration/
Hi, why do you think its jQueryInterface method causing that? Did you follow our laravel integration tutorial? https://tailwind-elements.com/docs/standard/integrations/laravel-integration/
I checked my project, and the installation of tw-element was same as the tutorial.
If I didn't install it well, why datetimepicker
worked?
Was the problem only with the datepicker and timepicker? You can try initializing those components for now via JS ( new Datepicker(...) new Timepicker(...)
).
We will try to find out what may cause that in laravel with blade
ThanksοΌI'll try with js. Looking forward to your good news.