zenwalker
zenwalker

Reputation: 3

Change the Increment Value of a SapUI5 Input (type: Number)

I want to change the increment step of a Input control in SapUI5 when pressing the Up and Down Arrows, but i wasn't able to find such a property in the documentation.

<Input type="Number" value="{/config/value}" liveChange="onPriceChange"
               editable="true"/>

Is there something like the "step" property for Input in HTML?

Upvotes: 0

Views: 1444

Answers (3)

Chandan Moolya
Chandan Moolya

Reputation: 1

We can use HTML tags in SAPUI5 now by declaring xmlns:html="http://www.w3.org/1999/xhtml" at the namespace and use whichever html tag we wish to have.

Example Code :

<mvc:View controllerName="com.sap.demo.DemoApp.controller.Master"
    xmlns:html="http://www.w3.org/1999/xhtml"
    xmlns:mvc="sap.ui.core.mvc" displayBlock="true"
    xmlns="sap.m"
    xmlns:core="sap.ui.core">
   <Page id="idPage" title="Demo App">
    <content>
        <!-- Use 'html:' before whichever html tag you want to use -->
        <html:input type="number"/>      
    </content>  
    </Page>
</mvc:View>

Hope this helps!

Upvotes: 0

Jaro
Jaro

Reputation: 1754

You can try to use property step of sap.m.StepInput instead.

Upvotes: 1

slkorolev
slkorolev

Reputation: 6001

No, there is no "step" property in SAPUI5 as the sap.m.Input of type "Number" exactly relies on HTML5 input. Probably you can update "step" property in the DOM element.

Upvotes: 0

Related Questions