I'm currently working on incorporating a basic date-picker into a custom Vue component. Since I am not utilizing webpack, I want to avoid using pre-made .vue components and instead focus on understanding how to incorporate simple JavaScript into Vue.
For guidance, I have been referring to this official Vue tutorial
I also came across this codepen example, but I am struggling to get the date picker to display properly.
You can view my current progress on jsfiddle:
HTML:
<div class="app">
<datepicker id='date-elem'></datepicker>
</div>
app.js:
Vue.component('date-picker', {
extends: Flatpickr,
mounted () {
this.Flatpickr(date-elem, {})}
})
What is the best way to integrate vanilla JavaScript into a Vue component without relying on .vue files or webpack?