Hi,
I'd like to load data from server when selected date changed.
Bellow is the code snip:
<scheduler-pro
ref="scheduler"
:startDate="startDate"
:endDate="endDate"
:config="productionPlanConfig"
:resource-time-ranges-feature="true"
:auto-adjust-time-axis="true"
:zoom-on-mouse-wheel="true"
:zoom-on-time-axis-double-click="true"
event-layout="pack"
:height="height"
/>
watch: {
myDate(newVal) {
this.startDate = this.$moment(newVal)
.startOf("month")
.toDate();
this.endDate = this.$moment(newVal)
.endOf("month")
.add(1, "days")
.toDate();
const schedulerInstance = this.$refs.scheduler.schedulerInstance;
// schedulerInstance.suspendRefresh();
schedulerInstance.project.load({ date: this.$moment(newVal).format('yyyy-MM-DDTHH:mm:ss') }).then(() => {
console.log(schedulerInstance);
schedulerInstance.timeAxis.startDate = this.startDate;
schedulerInstance.timeAxis.endDate = this.endDate;
// schedulerInstance.resumeRefresh(false);
});
}
}
The scheduler does render the UI when call the load() method first time but rendered after call the load() second time.
First time
Second time
Regards