vuejs-datepicker icon indicating copy to clipboard operation
vuejs-datepicker copied to clipboard

opened event mentioned in the documentation does not exist.

Open gmoneh opened this issue 4 years ago • 1 comments

The documentation mentions that an "opened" event will be fired when the calendar is opened, but this is not true, no such event exists.

gmoneh avatar Mar 09 '20 22:03 gmoneh

I also faced this problem. As a solution, you can fork this repository and add 'opened' emitter yourself in Datepicker.vue file in setInitialView() method

setInitialView () {
  const initialView = this.computedInitialView
  if (!this.allowedToShowView(initialView)) {
    throw new Error(`initialView '${this.initialView}' cannot be rendered based on minimum '${this.minimumView}' and maximum '${this.maximumView}'`)
  }
  switch (initialView) {
    case 'year':
      this.showYearCalendar()
      break
    case 'month':
      this.showMonthCalendar()
      break
    default:
      this.showDayCalendar()
      break
  }
  if (!this.isInline) {
    this.$emit('opened')
  }
}

dasnein avatar Mar 18 '20 12:03 dasnein