Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Using vuejs-datepicker with 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()
}
}
  
Source by aslamdoctor.com #
 
PREVIOUS NEXT
Tagged: #Using #Nuxt #JS
ADD COMMENT
Topic
Name
8+3 =