/wp-content/uploads/2015/07/sap_logo_750998.png

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.

    image1.PNGimage2.PNG

    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

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. Benedikt Sichinger

    Hi!

    I need some help with Kapsel calendar plugin:

    When i search an event with findEvent() it works fine when i preview it in the browser (chrome). I do a full day search an get all the relevant events.

    But when i test it on my android device i get no events.

    Only when i search for an event with the exact start and end Time, i get a result.

    var startDate = new Date(2017,2,29,10,30,0,0,0); // caution!!: month 0 = january, 11 = december
    var endDate = new Date(2017,2,29,12,30,0,0,0);

    But when i try a full day search, no events found on the android device.

    var startDate = new Date(2017,2,29); // caution!!: month 0 = january, 11 = december
    var endDate = new Date(2017,2,29);

    (0) 

Leave a Reply