Quantcast
Channel: SCN: Message List - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 8124

How to get calendar event types shown on the sap.me.Calendar control

$
0
0


I have an OData service feed which provides OverlapCalendarEvent data.

I have successfully bound this as an aggregation for the sap.me.OverlapCalendar control.

 

However I would also like present the information on the sap.me.Calendar control (in a 1 month grid) but this control doesnt offer the option of binding an aggregation.The only relevant API offered is sap.me.toggleDatesType().

 

So I tried fetching the event data from OverlapCalendar after the OData binding has been set using OverlapCalendar.getCalendarEvents(). But even though the data is shown correctly on the view with the sap.me.OverlapCalendar control, the API returns an empty array?

I am calling the API in onBeforeShow() after the call to sap.me.OverlapCalendar.bindAggregation.

Should I be calling it using some other event trigger (e.g. when the binding has completed?)

 

If I can get this API working then I planned to set up a loop through the data returned to find the different event types and then build arrays of dates of the different event types and then finally use the toggleDatesType() API to set the correct type to the Calendar control. Somewhat long winded, perhaps there is an easier way?

 

My requirement seems like a common one - show the calendar control in a 1 month grid with different calendar types on different days. Hence provide the user the ability to drill into a particular leave type by selecting one of the days.

 

Seems a shame that only the overlapCalendar control provides the option for binding to calendar events.


Viewing all articles
Browse latest Browse all 8124

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>