Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Dan_vL
Product and Topic Expert
Product and Topic Expert
0 Kudos

Calendar (New in SP06)

This plugin enables the ability to find, create and delete calendar entries in the Android or iOS calendar.  It uses the open source Calendar plugin.

For additional details on the Kapsel Calendar plugin see the file C:\SAP\MobileSDK3\KapselSDK\plugins\calendar\www\calendar.js or Using the Calendar Plugin.

The following steps will demonstrate an example of using this plugin.

  • Create the project.
    cordova create C:\Kapsel_Projects\CalendarDemo com.mycompany.calendar CalendarDemo
    cd C:\Kapsel_Projects\CalendarDemo
    cordova platform add android
    cordova plugin add cordova-plugin-device

    cordova create ~/Documents/Kapsel_Projects/CalendarDemo com.mycompany.calendar CalendarDemo
    cd ~/Documents/Kapsel_Projects/CalendarDemo
    cordova platform add ios
    cordova plugin add cordova-plugin-device
  • Add the device plugin and the Kapsel or open source calendar plugin.
    //Kapsel cordova plugin add nl.x-services.plugins.calendar --searchpath %KAPSEL_HOME%/plugins or cordova plugin add nl.x-services.plugins.calendar --searchpath $KAPSEL_HOME/plugins or //open source version cordova plugin add https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin 
  • Replace www\index.html with the contents of index.html.

  • Prepare, build and deploy the app with the following command.
    cordova run android
    or
    cordova run ios
    Press the Create Event button, then the Find Event button.  Open the device calendar.



    Note the Create Recurring, Open Calendar and List Calendar buttons only work with the open source version of the Calendar plugin.
    The open source Calendar plugin also contains additional methods that are platform specific.  For example the Android version contains a method calendar.createEventInteractively that when called creates an entry and then displays it in the calendar and the iOS version has methods named calendar.createCalendar and calendar.createEventInNamedCalendar.

Back to Getting Started With Kapsel

1 Comment