on 05-15-2017 7:25 PM
<Label text="Number" />
<Input value="{Num}" type="Number" />
This is dynamic row field in table column.
without particular ID Value.
try this
https://sapui5.hana.ondemand.com/explored.html#/entity/sap.m.MaskInput/samples
https://sapui5.hana.ondemand.com/#docs/api/symbols/sap.ui.model.SimpleType.html
<MaskInput value="{path: 'Num', type: 'sap.ui.model.type.Integer'}" mask="999"/>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried this one. I need without ID value because I am using grid Table ( ID will be generate dynamically) .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can attach browser event, check this,
var oInput = this.getView().byId("inputid");
oInput.attachBrowserEvent("keypress", function(oEvent) {
var charCode = (oEvent.which) ? oEvent.which : oEvent.keyCode;
if (charCode != 46 && charCode > 31 &&
(charCode < 48 || charCode > 57))
oEvent.preventDefault();
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your reply :
But i need like this below url
Allow only enter keyboard numbers in input
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<Input value="{Num}" type="Number" livechange="onChange"/>
function:onChange(oEvent)
{
myString = oEvent.getSource().getValue();
myString = myString.replace(/\D/g,"");
oEvent.getSource().setValue(myString);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your reply :
But i need like this below url
Allow only enter keyboard numbers in input
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.