Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9159

DatePicker and JSON Model -> no date output

$
0
0

Hello,

 

I created an object with the property dateValue which has a date stored like: Sun May 04 2014 17:25:00 GMT+0200 (CEST)

(This object is in an array and hold by another object).


var WorkEntries = {    workdata: []
};
function WorkEntry(name, dateval, checkinout) {    this.name = name;    this.dateValue = dateval;    this.checkinout = checkinout;
}


In my UI5 Project i set this WorkEntries as the JSON model:

var newModel = new sap.ui.model.json.JSONModel();
newModel.setData({workdata : WorkEntries.workdata});

Then I set the data binding to the table and the columns for name and checkinout work, but it doesn't work for the DatePicker... It displays nothing...

      var oControl =  new sap.ui.commons.DatePicker({        value: {             path: "/dateValue",               type: new sap.ui.model.type.Date({style: "long"})          }          });

 

Here is my JSBin -> search for BUGTODO

http://jsbin.com/openui5-table-json/434/edit?html,output

 

What am I doing wrong? Also tried to manually create a "/Date(...)" entry in the code, but this also doesn't work... Any help appreciated...


Viewing all articles
Browse latest Browse all 9159

Trending Articles



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