The Scheduler component for Vue represents a widget displays a set of Appointments in Day, Week, Month, Timeline Day, Timeline Week and Timeline Month views.
Refer to Vue Getting Started before you start with this help topic.
After you have created your App.vue file, here is how you should structure it:
The Scheduler component for Vue requires the following import:
Add the jqxScheduler component to the components section of the the Vue class:
The App.vue has a <template>
structural tag where we determine the application structure.
There we will also set the tags for the new components - <JqxScheduler/>
The properties of the <JqxScheduler/> component are defined in the data
member of the Vue class.
We should put them in the return object of the data function:
The events in Vue are set as an attribute with @ prefix, for example:
All events that are bound to a component are implemented in the methods
member of the Vue class.
To use a component's method we should have its reference. In Vue we refer to a component by the special $refs
property.
Before that we need to add the desired name reference to that component:
<JqxScheduler ref="scheduler"></JqxScheduler>
Here how you can use a component's method:
this.$refs.scheduler.ensureAppointmentVisible();
If we want to add additional methods we should also implement them in the methods
member.
In case we need to do some precalculation or something else before the components are rendered, we should use the beforeCreate
member.
In this case:
If you have followed the above steps, you App.vue file would look like this: