Baremetrics / calendar

Date range picker for Baremetrics
MIT License
680 stars 79 forks source link

Integration with Vue.js #98

Closed silent-lad closed 5 years ago

silent-lad commented 5 years ago

Can I know how can I integrate this inside a Vue.js Application?

kalepail commented 5 years ago

I mean just like you would include it in any other project. You'll want to create the calendar inside the VueJS component and you'll need to watch that if you remove the element you recreate the calendar when you replace it back in to the DOM. But other than that there really isn't anything special for using this in a framework like VueJS. If you understand how shadow DOM frameworks work it will help when using DOM dependent plugins like this.

kalepail commented 5 years ago

Fwiw we do this all the time in Baremetrics actually. We include a call to the calendar script in the head and then just call the new Calendar whenever we need to build a calendar.