Export calendar to string

Hello,
I'm testing out Schedule component. I like the export to iCal feature. But looks like I can only download as a file? Is there a way to get access to contents as a string so I can save it to a database.
Thanks.

2 Replies 1 reply marked as answer

VP Volkan Paksoy April 16, 2021 10:03 AM UTC

Hello again,

In case my question is not clear I wanted to a bit more info:

I'm aware of the exportToICalendar method which exports to a file and client downloads the .ics file. What I'm trying to do is something like: 

var icsData = this.scheduleObj.exportToICalendar();

So that I can then use icsData somewhere else, such as posting to an API to save in the backend.

Hope this helps.

If this cannot be done please let me know either way so that I can look into other options.

Thanks.



RV Ravikumar Venkatesan Syncfusion Team April 19, 2021 11:14 AM UTC

Hi Volkan, 

Greetings from Syncfusion Support. 

Currently, it is not feasible to export the events to string in our scheduler. However, we can get the appointments and their details using the getEvents method. Please refer to the following sample in which you can get all the appointment details rendered in the scheduler in the appointmentDetails variable. 
 
[app.component.ts] 
  public btnClick(): void { 
    let appiontmentDetails = this.scheduleObj.getEvents(); 
    console.log(appiontmentDetails); 
  } 


Please get back to us if you need any further assistance. 
 

Regards, 
Ravikumar Venkatesan 


Marked as answer
Loader.
Up arrow icon