We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Not able to show events in Schedule

Hi,

I'm trying to show some events in Schedule but I'm unable to show the events.
I'm setting eventSettings dataSource property and I can confirm this property has some values but in schedule control does not appear the events.

This is my code to bind data:

private populateSchedule() {
for (const absence of this.holidays) {
console.log('TCL: HolidaysComponent -> populateSchedule -> absence', absence);
this.scheduleObj.push({
Id: absence.id,
Subject: `${absence.reason}: ${absence.lastName}, ${absence.firstName}`,
StarTime: moment(absence.startDate, 'DD-MM-YYYY').toDate(),
EndTime: moment(absence.endDate, 'DD-MM-YYYY').toDate(),
IsAllDay: true,
IsBlock: true
});
}
this.eventSettings.dataSource = this.scheduleObj;
console.log('TCL: HolidaysComponent -> populateSchedule -> this.eventSettings.dataSource', this.eventSettings.dataSource);
console.log('TCL: HolidaysComponent -> populateSchedule -> this.scheduleObj', this.scheduleObj);
}

This is console.log showing data:


And this is the result screen:

I'm sure that this is a noob question.
Thank you very much for your help.

Regards
Jose





5 Replies

KK Karthigeyan Krishnamurthi Syncfusion Team August 5, 2019 07:06 AM UTC

Hi Luis,  
 
Syncfusion greetings. 
 
We suspect that data collection is not properly assigned to Scheduler which could be the cause. In the below sample, we have rendered the event in Scheduler on button click action. 
 
btnClick(): void { 
      this.scheduleObj.eventSettings.dataSource = this.data; 
  } 
 
Kindly try the sample and if the issue persists, try to reproduce the error in a sample and revert else share your code example/runnable sample (if possible) to serve you better. 
 
Regards, 
Karthi 



JL Jose Luis Garcia August 12, 2019 05:45 PM UTC

Hi Karthi,

Sorry for delay in my answer.
I'm not sure what is the problem but I've run your example in stackblitz with the same result, no events are showed.
If I understand an event must be shown on 2018-01-15 after pressed button SHOW, but the calendar is empty.


The same happends in my code, I've translated you code to my app with the same result, events are not showed but datasource is populated.

Do I need to call some kind of refresh after populate datasource?

Regards
Jose


KK Karthigeyan Krishnamurthi Syncfusion Team August 13, 2019 04:49 AM UTC

Hi Jose, 
 
Thanks for the update. 
 
Below are the only possible causes for the reported problem. Kindly share your code example to update the Scheduler data source with in button click function to proceed further. 
 
  1. Data collection timing may be wrong.
  2. Data collection are not correctly added to Scheduler.
 
Regards, 
Karthi 



SD Sahar dhaya July 23, 2021 10:48 PM UTC

Hello ,

I still have the same problem

The schedule is still empty with no data inside 

i tried using local data and remote data and i have same issue 

 could  you help me please 



NR Nevitha Ravi Syncfusion Team July 26, 2021 07:18 AM UTC

Hi Sahar, 

Greetings from Syncfusion Support. 

We suspect that the reported problem is due to proper start and end time not provided to the appointments or resource id missed if you are using grouping. Kindly check the above scenario at your end if you still face the issue please share the below details to validate it at our end. 
  • Scheduler related code snippets
  • Whether you are using remote data or local data?
  • Scheduler package version.
  • Replicate the issue in a sample if possible

Regards, 
Nevitha 


Loader.
Live Chat Icon For mobile
Up arrow icon