Access Component props from third party component - vuejs datepicker

337 Views Asked by At

Any ideas to access this Datepicker prop > PickerMonth > pageDate The idea is, I want to get the month name when @changedMonth is triggered.

<datepicker 
  :inline="true" 
  v-model="dateState" 
  :disabledDates="disabledDates"
  :highlighted="highlighted"
  @changedMonth="changedMonth"></datepicker>
changedMonth(value) {
  console.log(Datepicker> PickerMonth> pageDate) //which is Fri Feb 01 2019 00:00:00 GMT+0800 as an example
}
1

There are 1 best solutions below

1
Harshal Patil On

If you are using this component as a date picker, https://github.com/charliekassel/vuejs-datepicker, then changedMonth event handler will provide your the required changed month as input (Use $event).