[Vuejs]-How to display a week range v-date-picker range?

0👍

If I understood you correctly try like following snippet:

new Vue({
  el: '#app',
  data() {
    return {
      value: null,
      availableDates: { 
        start: new Date(), 
        end: new Date(new Date().setDate(new Date().getDate() + 7)) 
      }
    }
  }
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<script src="https://unpkg.com/v-calendar@1.0"></script>
<div id='app'>
  <v-date-picker v-model="value" :available-dates="availableDates" is-inline></v-date-picker>
  
  The current date is: {{ value || 'null' }}
</div>

Leave a comment