cancel
Showing results for 
Search instead for 
Did you mean: 

Two-way binding of a sap.m.Input numeric input field, language dependent

Former Member
0 Kudos

Hello,

I need to bind a a sap.m.Input control with a field, which type is numeric.

Suppose we have the number 8000.5 in the model

we want in the view,

if the language is English, we show 8,000.50

if the language is German, we show 8.000,50 (point as separator and comma before decimal)

If the user type "8.000,49" in German, we get the 8000.49 in the model.

In general, we need to have two decimal and easy-to-read representation in the view with two way binding.

Is there any recommended way for doing this?

Thank You.

Accepted Solutions (0)

Answers (2)

Answers (2)

Sharathmg
Active Contributor
0 Kudos

First, read the language of the user/profile/browser in your code.

Based on the language - DE/EN/FR, define the number to displayed in the custom formatter function for the input field.

Regards,

Sharath

former_member365727
Active Contributor
0 Kudos

https://sapui5.hana.ondemand.com/explored.html#/sample/sap.ui.core.sample.TypeFloat/preview

Use Data types and formatter options for more detailed control