Closed DivingPigy closed 6 years ago
I haven't pick up anything applicable or helpful in official docs. Seems so hard for me.
Ahu, I get the time when the calendar-view is not changing. The process is bellow:
1) Set the ref property for calendar, using the ref to get it. <FullCalendar :events="events" :config="config" @event-selected="eventSelected" @day-click="dayClick" ref="calendar">
2) Get the calendar element, then print it in the console. console.log(this.$refs.calendar.fireMethod('getDate').format());
Notes: fireMethod is recommanded in the vue-demo.
Then I need to get the calendar-view params.
Now, I achieved to get time start-end in my program phase.
Notes: the criticle poiont: View-object and his property should. Find them on the official docs.
Sorry for forget the code phase:
console.log(this.$refs.calendar.fireMethod("getView").start.format()); console.log(this.$refs.calendar.fireMethod("getView").end.format());
Check out this, using json feed to solve this problem. Json feed can do dynamic request for data to display, when calendar-view changing or you click the next or prev date-navigation link.
Notes: Items bellow may help you: 1) https://github.com/CroudTech/vue-fullcalendar#using-a-json-feed 2) https://github.com/CroudTech/vue-fullcalendar/issues/127
I solve this problem! Fantastic is Github!
For example, I click the tag in a view, may I get the time-range after it?