Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CalendarPane update:page created miss parameter #125

Closed
MoraesGil opened this issue Apr 10, 2018 · 6 comments
Closed

CalendarPane update:page created miss parameter #125

MoraesGil opened this issue Apr 10, 2018 · 6 comments
Assignees
Labels
Milestone

Comments

@MoraesGil
Copy link

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

@MoraesGil
Copy link
Author

MoraesGil commented Apr 18, 2018

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

@EricMcRay
Copy link
Contributor

EricMcRay commented Apr 18, 2018

You can bind frompage with sync modifier.

:from-page.sync="myFromPage"

@MoraesGil
Copy link
Author

@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()
  },
}

@nathanreyes
Copy link
Owner

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

@rcascante
Copy link

rcascante commented Jan 15, 2019

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

@maicss
Copy link

maicss commented Feb 11, 2020

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants