cancel
Showing results for 
Search instead for 
Did you mean: 

Use SAPUI5 Single Planning Calendar but not for Appointments

Ron_Hagan
Product and Topic Expert
Product and Topic Expert
0 Kudos

I would like to use the Single Planning Calendar to show data I'm retrieving from an HTTP GET request.  When I went into the View.xml file and tried to add a different type of data structure, I got an error saying that the aggregation I wanted to add doesn't exist in the sap.m.SinglePlanningCalendar class.

The information I want to add instead of an appointment has a few more pieces of data than the Appointment aggregation.

I just noticed that there is another Aggregation called CustomData but I'm not sure how to use it. 

Is it possible that this might work for this project?

If so, does anyone happen to know of a tutorial or article that would show how to use it?  I've started looking but haven't found anything useful, yet.

Thanks in advance for any and all suggestions!

Cheers!

Ron

View Entire Topic
Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @Ron_Hagan,

The aggregation supported by the SinglePlanningCalendar is of type CalendarAppointment - which does feature the customContent aggregation. However, the SinglePlanningCalendar wasn't thought of as having custom data displayed directly on the grid. Therefore, it is completely ignored when set. 

Maybe you could use the PlanningCalender instead and when the user clicks on the "appointment" it displays additional data?

On the following sample, it shows information of the selected appointment on a message box:

https://sapui5.hana.ondemand.com/#/entity/sap.m.PlanningCalendar/sample/sap.m.sample.PlanningCalenda...

But you could adapt it to your needs. You could get the single instance of the object based on the item selected and then display any additional data - separate from the grid itself.

Best regards,
Ivan

Ron_Hagan
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Ivan.
Ron_Hagan
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Ivan. I think that might work! I might have to figure out how to have the calendar show like the Planning Calendar does for its Month View but hopefully that won't be too bad. Thank you!!!!
Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @Ron_Hagan,

Yes, you can have different custom views on the PlanningCalendar. Check the documentation for a sample which shows 3 days, 10 days, etc.

Best regards,
Ivan