V-calendar: CalendarPane update:page created miss parameter

Created on 10 Apr 2018  路  6Comments  路  Source: nathanreyes/v-calendar

previous I could to get current date by page change trigger on created
now, on Created emit update:page but not passing page by the parameter

bug

Most helpful comment

@rcascante you should use @update:from-page="someFn", the document is wrong, source code: https://github.com/nathanreyes/v-calendar/blob/master/src/components/Calendar.vue#L537

All 6 comments

I still can't get the current page on @update:frompage="pageChange"

this event only trigger when next/back page is clicked,

have any other way to get Initial Page? because I would like to change page if user click no day from another month

You can bind frompage with sync modifier.

:from-page.sync="myFromPage"

@EricMcRay I've tried as you suggested but myFromPage never change
and currentPage only update when I move first time to next or back page
maybe I wrote something wrong can you help?

<calendar
              is-expanded
              paneCentered
              :attributes="calendarData"
              :from-page.sync="myFromPage"
              @update:page="pageChange"
              @update:frompage="pageChange"
              @dayclick='dayClick'
              /> 

```
data() {
return {
myFromPage: null,
currentPage: null,
}
},

  ```
methods: {
pageChange (page) {
      this.currentPage = page
      this.fetchData()
    },
}

Ok I see where the issue is now. It'll get 'repatched' on the next revision.

Has this issue been updated?
I'm trying to access to the position property of the page object.
@update:fromPage="changeMonth
changeMonth(page) { console.log(page); },
I get only this properties:
days: 31 firstDayOfWeek: 2 firstWeekday: 3 inLeapYear: false month: 1 weeks: 5 year: 2019

@rcascante you should use @update:from-page="someFn", the document is wrong, source code: https://github.com/nathanreyes/v-calendar/blob/master/src/components/Calendar.vue#L537

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nik736 picture nik736  路  3Comments

knagyorg picture knagyorg  路  4Comments

Maadtin picture Maadtin  路  3Comments

thfontaine picture thfontaine  路  3Comments

maksnester picture maksnester  路  3Comments