[Vuejs]-Can I pass a parameter by pickerDate vuetify?

1👍

You cannot pass parameters in picker-date, but still you can pass in Vuetify datepicker update:picker-date event
When you change the month in datepicker, it returns the value as 2019-10 if the selected month is October. If you change the month November then the value will be 2019-11 and id is what your passing on the iteration

      <v-date-picker
        v-model="date"
        class="mt-4"
        @update:picker-date="pickerUpdate($event, id)"
      ></v-date-picker>


new Vue({
  el: '#app',
  vuetify: new Vuetify(),
  data: () => ({
    date: '2019-10-15',
    id: 5,
  }),
  methods: {
    pickerUpdate(val, id) {
      // you can read the val --> 2019-10 for october, id what you  are passing
      // when you iterate with multiple date picker, you can set id's 
      // write your async call here
       console.log('from picker update ' + val + '  id: ' + id );
    },
  },
})
👤chans

Leave a comment