简体   繁体   中英

Access Component props from third party component - vuejs datepicker

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
}

如果您将此组件用作日期选择器https://github.com/charliekassel/vuejs-datepicker ,则changedMonth事件处理程序将提供所需的更改月份作为输入(使用$event )。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM