Hello
This thing is super awesome, lightweight and not built on top of jQuery , but I have one issue with using Plugins with module bundler such as Webpack 3.
Is there anything other to import besides the flatpicker itself in Webpack enviroment, because when I use something like this:
import Flatpickr from 'flatpickr'
new Flatpickr(domNode, {
enableTime: true,
plugins: [new confirmDatePlugin()]
})
It throws me error that confirmDatePlugin is not defined ?
Thanks.
You need to import them too.
import confirmDatePlugin from 'flatpickr/dist/plugins/confirmDate/confirmDate' ;
import 'flatpickr/dist/plugins/confirmDate/confirmDate.css' ;
Thanks @ankurk91
@bedakb please reopen if you still experience any issues
Please add
You need to import them too.
import confirmDatePlugin from 'flatpickr/dist/plugins/confirmDate/confirmDate' ; import 'flatpickr/dist/plugins/confirmDate/confirmDate.css' ;
I'm confused... So, the script files are needed for plugins, but the core of flatpickr should be downloaded from NPM?
Please add this to the documentation! I'm sure this may be obvious to many, but I have been really struggling to track down exactly how to use the recommended NPM download and the plugins. I have been using script files for over a year and will just go back to that for now.
Most helpful comment
You need to import them too.