Get 2024 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

Flatpickr - Laravel


Hi
I'm having trouble implementing Flatpickr in my form, it says :
Uncaught TypeError: $(...).flatpickr is not a function

Metronic Version 8.0.38

already on mixmanifest.json "/demo1/plugins/custom/flatpickr/flatpickr.bundle.js": "/demo1/plugins/custom/flatpickr/flatpickr.bundle.js",


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (4)



"test" => [
"title" => "Test",
"assets" => [
"custom" => [
"css" => [
"plugins/custom/flatpickr/flatpickr.bundle.css"
],
"js" => [
"plugins/custom/flatpickr/flatpickr.bundle.js",
"js/custom/lot/test.js",
],
],
],
],


This does not work need urgent help,
i am trying to call flatpicker form the test.js



Hi Jesus,

Sorry for the delay.

The file should be there, public/demo1/plugins/custom/flatpickr/flatpickr.bundle.js
But you have to include it on your page.

For example using page config;
config/global/pages.php


"assets" => array(
"custom" => array(
"js" => array(
"plugins/custom/flatpickr/flatpickr.bundle.js"
),
),
),


Thanks



can someone support me?

Greetings



I already tried the following

If you’re using a bundler, e.g. webpack, you’ll need to import flatpickr.

// commonjs
const flatpickr = require("flatpickr");

// es modules are recommended, if available, especially for typescript
import flatpickr from "flatpickr";

as the documentation mentions (https://flatpickr.js.org/getting-started/)


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(