on 05-17-2017 8:14 AM
Hi,
i use a Edm.Decimal-Value in my oData. In Internet Explorer everything works well.
But in Chrome when i bind the Value:
<Input type="Number" value="{ path: 'Monatssumme',mode:'TwoWay',type: 'sap.ui.model.odata.type.Decimal', constraints:{ precision:6,scale:2}}" />
i got the Error:
The specified value "2,00" is not a valid number. The value must match to the following regular expression: -?(\d+|\d+\.\d+|\.\d+)([eE][-+]?\d+)?
Found the problem and the soultion...
the problem was
type="number"
which is handled in an other way on chrome...so i changed my binding to the following:
added
formatOptions:{decimalSeparator:','}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
3,0 isn't a number in any programming language.
3.0
is the way to go 😉 if you need to display numbers in a different way, you should use the formatter.
<Input type="Number" value="{ path: 'Monatssumme',mode:'TwoWay',type: 'sap.ui.model.odata.type.Decimal', constraints:{ precision:6,scale:2}, formatter: '.formatterName.methodName'}" />
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.