on 10-17-2017 8:05 PM
I imported the sample Gantt Chart application Gantt Chart Sample and started off tweaking it to suit my needs in the SAP WebIDE.
One of the change I was trying to make is to mark holidays in the Calendar. Going through SCN for a way to implement I came across the following 2 threads on this :
Gantt Chart in SAP UI5 – Drag and Drop functionality between 2 Charts - Comment by bhoomika.jain to use CalendarDefs
SAPUI5 - GANTT - Calendar in backround - CalendarDef max. amount of Dates is 100 by bjoern.burandt
The problem here is I am unable to instantiate the necessary classes for the same.
I started off trying to instantiate for sap.gantt.def.cal.TimeInterval using following code in onInit method of BasicGanttChart.controller.js ( after
oGanttChartWithTable.setSelectionMode(sap.gantt.SelectionMode.Multiple) )
var timeIntTemplate = new sap.gantt.def.cal.TimeInterval({
startTime: "20170201080000",
endTime: "20170301160000"
});
But this is throwing error in chrome debugger :
Uncaught TypeError: Cannot read property 'TimeInterval' of undefined
If I check in debugger - sap.gantt.def.cal is not defined and if I check sap.gantt.def I only see SvgDefs and filter and nothing more:
Please help as to how to overcome this issue.
The sapui5 library I am using is :
src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
Hi Ashutosh Jha,
try adding the following lines before instantiating the defs.
If this is gonna work, put those lines at the beginning of your controller in order to make it possible for the component-preload.js to request the libs..
Best regards,
Stephan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.