Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SetValue in dropdownbox


I have a dropdownbox.

r1c1 is a dropdownbox.

oJSONModel1.loadData(sUrlSlots, null, false);


          var oItemTemplateDate = new sap.ui.core.ListItem({

            text : {

              path : "SlotDt",

              formatter : function(fValue) {


                var oDateFormat = sap.ui.core.format.DateFormat.getDateTimeInstance({

                  pattern : "YYYY-MM-dd"


                if (fValue != undefined || fValue != null) {

                  fValue = fValue.toString();

                  fValue = fValue.slice(6, -2);

                  fValue = Number(fValue);


                return oDateFormat.format(new Date(fValue));




          oItemTemplateDate.bindProperty("enabled", "enabled");

          r1c1.bindItems("/d/results", oItemTemplateDate);


I am trying to set default value from  a list


But  its not working. Any hint how to resolve this issue.

Best regards,


Not what you were looking for? View more on this topic or Ask a question