TW-Elements icon indicating copy to clipboard operation
TW-Elements copied to clipboard

[datepicker][jQueryInterface not defined]

Open tashuo opened this issue 1 year ago β€’ 4 comments

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

tashuo avatar Sep 08 '23 15:09 tashuo

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/

juujisai avatar Sep 11 '23 05:09 juujisai

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?

tashuo avatar Oct 18 '23 07:10 tashuo

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

juujisai avatar Oct 19 '23 06:10 juujisai

Thanks,I'll try with js. Looking forward to your good news.

tashuo avatar Oct 21 '23 10:10 tashuo