by Anonymous » 30 Apr 2025, 21:12
I'm using jquery 3.6 and flatpickr 4.6.9 in my project, but when I try to instantiate using my jquery selector, it gives me the following error:
Uncaught TypeError: $datePlanted.flatpickr is not a function
JQuery
Code: Select all
import $ from 'jquery';
import flatpickr from 'flatpickr';
const $datePlanted = $('.plot-tree-form__date-planted-text')
$datePlanted.flatpickr({
enableTime: false,
dateFormat: 'Y-m-d'
});
< /code>
html < /p>
Date Planted Here
Laut Flatpickr -Dokumentation sollte dies funktionieren.
Wie kann ich dieses
Problem lösen?
I'm using jquery 3.6 and flatpickr 4.6.9 in my project, but when I try to instantiate using my jquery selector, it gives me the following error:
Uncaught TypeError: $datePlanted.flatpickr is not a function
JQuery
[code]import $ from 'jquery';
import flatpickr from 'flatpickr';
const $datePlanted = $('.plot-tree-form__date-planted-text')
$datePlanted.flatpickr({
enableTime: false,
dateFormat: 'Y-m-d'
});
< /code>
html < /p>
Date Planted Here
[/code]
Laut Flatpickr -Dokumentation sollte dies funktionieren.
Wie kann ich dieses [url=viewtopic.php?t=20324]Problem[/url] lösen?