Skip to Content

Date Value not displaying in the Disabled Date Picker field

Jan 18 at 04:47 PM


avatar image
Former Member

Hi All,

I have a application which uses a Datepicker field which is a part of Table rows. Issue I am facing here is that even though the odata service is returning a value for this field, and the binding is correct as well, it just keeps displaying the placeholder in the output. Unfortunate part here is that there is no Error in the console either. I know the information above is not much to go on with, but has anyone ever faced a similar issue and had a resolution for it do let me know.

Any feedback or ideas will be appreciated.

here is the datepicker definition if this helps in anyway.

<DatePicker enabled="false" value="{path: 'CovenantDate', formatter: '.fnFormatDates'}" displayFormat="dd/MM/yyyy" valueFormat="yyyy-MM-dd" change="onSaveTables" />

Hereis the formatter function :

fnFormatDates: function(oValue){
// format date
if (oValue) {
var oDateFormat = sap.ui.core.format.DateFormat.getDateInstance({
pattern: "dd/MM/yyyy",
UTC: true
return oDateFormat.format(new Date(oValue));
} else {
return oValue;


Parth Shah

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Ankur Babu Jan 19 at 10:54 AM

I don't think you need a formatter there just to display the date. Try this if it works:

<DatePicker enabled="false" value="{path: 'CovenantDate', type: 'sap.ui.model.type.Date'}" displayFormat="dd/MM/yyyy" valueFormat="yyyy-MM-dd" change="onSaveTables" />
Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thank you Ankur, yes this helped. The only reason I had added the Formatter was the Date format and to get the date in UTC format. I was able to add the UTC format option in the view itself and it worked.


Parth Shah


Glad to help