Usando vuejs-datepicker con nuxt js
npm i vuejs-dnpm i vuejs-datepicker
/plugins/vue-datepicker.js
import Vue from 'vue'
import Datepicker from 'vuejs-datepicker'
Vue.component('date-picker', Datepicker)
nuxt.config.js
plugins: [
... other plugins
{ src: '~/plugins/vue-datepicker', ssr: false }, // datepicker plugin here
],
<client-only><date-picker
placeholder="MM/DD/YYYY"
format="MM/dd/yyyy"
v-model="date_today" /></client-only>
data(){
return{
... your other data variables ...
date_today:new Date()
}
}
koko