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

Re: Date format and Date picker

$
0
0

Hi Robin,

It did not work for me like that either.

But I did find a solution for this,

 

Taking a close look at my date format - yyyyMMdd which is fixed, I have a source which is not compatible to the locale. Hence I need a way to define the source pattern too. And I tried the following in the template

 

 

 

template: new sap.ui.commons.DatePicker({

    value:{

     path : "DeliverDate",

     type : new sap.ui.model.type.Date({source: {pattern: "yyyyMMdd"}, pattern: "dd.MM.yyyy"})

    }

   })

 

works and displays 22.07.2014 for the incoming String 20140722.

 

When I send this data back to the server, I do not need any conversion, as I have the date patterned in the way the backend needs.

 

Sincere thanks to you for making me think

cheers

Domnic


Viewing all articles
Browse latest Browse all 8332

Trending Articles