未捕获的错误:Date必须是一个JavaScript date对象; 元素sap.m.PlanningCalendar#PC1

2020-09-01 15:12发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


5条回答
xfwsx85
2020-09-01 15:40 .采纳回答

最后我找到了解决方案:

我尝试了这个,它工作正常。

查看:-

id =" PC1"

singleSelection =" false"

showIntervalHeaders =" false"

startDate =" {路径:'/startDate'}"

rows =" {path:'/people'}"

appointmentsVisualization ="已填充"

appointmentSelect =" handleAppointmentSelect"

intervalSelect =" handleIntervalSelect">

<行>

id =" PC2"

icon =" {pic}"

title =" {name}"

text =" {角色}({level})"

key =" {empid}"

appointments =" {path:'appointments',templateShareable:'true'}">

<约会>

<统一:日历约会

startDate =" {start}"

endDate =" {end}"

icon =" {pic}"

title =" {title}"

text =" {info}"

type =" {type}"

color =" {color}"

tentative =" {tentative}">

startDate =" {start}"

endDate =" {end}"

icon =" {pic}"

title =" {title}"

type =" {type}">

CONTROLLER:-

onInit:函数(){

var data = 0;

var oModel = new sap.ui.model.json.JSONModel();

$。ajax({

网址:"/img/altcal/hana/wfs/services/getRosterInJSON.xsjs",

async:false,

类型:"获取",

dataType:'json',

成功:功能(响应){

数据=响应;

var data1 = {};

var yr = new Date(data.startDate).getFullYear();

var mnt = new Date(data.startDate).getMonth();

var day = new Date(data.startDate).getDate();

data1 [" startDate"] =新的Date(yr,mnt,day);

data1 [" people"] = data [" people"];

for(data [" people"]中的var pIndex){

for(data [" people"] [pIndex] [" appointments"]中的var aIndex){

data1 [" people"] [pIndex] [" appointments"] [aIndex] [" start"] =新的日期(data1 [" people"] [pIndex] [" appointments"] [aIndex] [" start" ]);

data1 [" people"] [pIndex] [" appointments"] [aIndex] [" end"] =新的日期(data1 [" people"] [pIndex] [" appointments"] [aIndex] [" end" ]);

console.log();

data1 [" people"] [pIndex] [" headers"] [aIndex] [" start"] =新的日期(data1 [" people"] [pIndex] [" headers"] [aIndex] [" start" ]);

data1 [" people"] [pIndex] [" headers"] [aIndex] [" end"] =新的日期(data1 [" people"] [pIndex] [" headers"] [aIndex] [" end" ]);

}

}

oModel.setData(data1); console.log(" view_Shift",data1); }}); this.getView()。setModel(oModel);

},

一周热门 更多>