I am using a datepicker component in my project. Basic usage would be like this:
date-picker(language="fr" v-model="date")
There are several attributes which will get repeated each time we need to use a date picker: language
for instance.
So I would like to be able to simply do that when a date picker is needed.
date-picker(v-model="date")
And that would default to fr
for the language
property of the 3rd party library.
Here is what I have tried:
- A custom component which extends the Datepicket component: Not that great as I need to define a template which contains the original date picker component. That translates to a superfluous wrapper component
- A plugin? I can only inject properties to the global Vue instance. (pretty new to Vue)
- Mixin does not apply as I would need to change the 3rd party component