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

Re: Time is shown as NaN Format

$
0
0

Hi Colleagues,

 

I am able to resolve that issue using below code, But with this the dropdown is showing the same time for every value.

 

  1. SlotTi: "PT08H00M00S"
  2. SlotTi: "PT08H10M00S"

  3. The time shown is dropdown is 11:00:00
              1. 11:00:00
              2. 11:00:00 and so on

  4. What is missing to show different values in dropdown.

 

   var oItemTemplate2 = new sap.ui.core.ListItem(

          {

            text :

            {

              path:"SlotTi",

              formatter : function(fValue)

              {

                jQuery.sap.require("sap.ui.core.format.DateFormat");

                var oTimeFormat = sap.ui.core.format.DateFormat.getTimeInstance(

                    {

                      pattern: "KK:mm:ss a"

                    });

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

                  fValue = Date(oTimeFormat.parse(fValue));

                }

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

              }

            }

          });

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

      dropbox.bindItems("/d/results", oItemTemplate2);

 

 

 

Best regards,

Rohit


Viewing all articles
Browse latest Browse all 8122

Trending Articles