Skip to Content
0
Aug 05, 2016 at 03:20 PM

SAPUI5 with oData (edm.DateTime) and datePicker

4203 Views

Hello,

I am having trouble to link the date coming from oData and the datePicker. I looked through the forum but I was not able to solve it.

I am able to display the date if I use sap.m.Input (2nd one in the picture)

this.oDateInput = new sap.m.Input({ editable: true,

value: "{path: 'JsonSes>/Date', type: 'app.model.type.Date'}",

});

If I am not able to display the date when I use the datePicker even if the path is the same (1st one in the picture)

this.oDateFrom = new sap.m.DatePicker( {

dateValue : {

path : 'JsonSes>/Date',

type: new sap.ui.model.type.Date({pattern: "YYYY/MM/dd", strictParsing: true})

},

width: "140px",

} );

Could you please help me?

Thank you

Marie-Josée

Attachments

date.JPG (11.9 kB)