Hi All
The oData model returns the date value as - 2013-05-30T00:00:00
How do I change it to a MM-dd-yyyy format when displaying in a date picker. I tried the following formatter class
var oDatePicker1 = new sap.ui.commons.DatePicker("lossDateID",{
value:{
path: "jsonModel>/EZlotReview/FirstNoticeDate", formatter: function(fValue){
jQuery.sap.require("sap.ui.core.format.DateFormat");
var oDateFormat = sap.ui.core.format.DateFormat.getDateTimeInstance({pattern: "MM-dd-yyyy"});
return oDateFormat.format(new Date(fValue));
}
}