question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[support] Flatpickr Plugins?

See original GitHub issue

Sorry if this is a really noob question but im pretty new to the JS world and im not sure how i would enable one of the flatpickr built in plugins…

Here is my setup

import flatPickr from 'vue-flatpickr-component';
import 'flatpickr/dist/flatpickr.css';
import 'flatpickr/dist/themes/dark.css';

Vue.use(flatPickr);

and the config object

timeConfig: {
              enableTime: true,
              plugins: [new confirmDatePlugin({})],
              noCalendar: true,
              enableSeconds: false,
}

The errors i’m getting would indicate that im importing the plugin incorrectly, which wouldn’t surprise me but i can’t for the life of me figure out how to get it working, so I was hoping to get some help, thanks in advance.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
ankurk91commented, Jul 20, 2017

@JeffBeltran I have updated the examples with plugins. Here is how you can do it -

 import ConfirmDatePlugin from 'flatpickr/dist/plugins/confirmDate/confirmDate';
 import 'flatpickr/dist/plugins/confirmDate/confirmDate.css';
timeConfig :{
    enableTime: true,
    plugins: [new ConfirmDatePlugin({confirmText: 'Done'})]
}

Plugins are opt-in, you need to import them beforehand.

1reaction
JeffBeltrancommented, Jul 20, 2017

Ah, that did it. Thanks @ankurk91!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plugins - Flatpickr
Plugins are essentially a set of hooks, that receive an optional config object and a flatpickr instance. Functionality requested by users that doesn't...
Read more >
Flatpickr by Samson Maosa - Plugins - Filament
Flatpickr is one of the most popular js datepickers. This filament plugin allows you to use flatpickr as a Filament Field without the...
Read more >
Flatpickr and Bootstrap Integration for Bootstrap ... - Keenthemes
Flatpickr's CSS is highly customized in sass/vendors/plugins/_flatpickr.scss SCSS file in order to use it as native component within the design system.
Read more >
Date field doesn't display properly - WordPress.org
Hello, i don't know if it's a problem with my theme (i use Libre 2) or maybe caching/minify plugin? (i use Litespeed Cache)....
Read more >
fm-plugin-flatpickr - npm
Latest version: 1.2.1, last published: 3 years ago. Start using fm-plugin-flatpickr in your project by running `npm i fm-plugin-flatpickr`.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found