New to Telerik UI for ASP.NET Core? Download free 30-day trial

Import and Export to iCal

Loading Demo...
  • EXAMPLE
  • VIEW SOURCE
  • Edit in Theme Builder
  • import_export_ical.cshtml
  • Import_Export_IcalController.cs

Also available for:

API REFERENCE

Description

In this example, you can see how you can use a third-party library (in this case, ical.js) that supports the iCalendar standard to import or export the ASP.NET Core Scheduler events.

To achieve fully customized iCalendar import/export integration you need to:

  • Define a custom DataSource schema based the iCalendar standards (kendo.data.schemas["scheduler-ical"])
  • Create Import and Export buttons which will use the importICal and exportICal methods
  • To import iCal data into the Scheduler component, you need to create an empty array, process it with the chosen iCal library (in this case ical.js) and use the Scheduler’s setDataSource method to push the generated array of iCal items to the Scheduler (refer to function importICal(iCalData) in the demo source code)
  • To export the Scheduler’s data to iCal you need to read the items from the Scheduler’s DataSource and create an iCal formatted text using the chosen iCal library (refer to function exportICal() in the demo source code)

Support & Learning Resources