I am using OpenUI5 and I want to disable an input field. I've already tried the following, but it is not working:
sap.ui.getCore().byId("xxx").setDisabled(true)
I am using OpenUI5 and I want to disable an input field. I've already tried the following, but it is not working:
sap.ui.getCore().byId("xxx").setDisabled(true)
The input control does not have a 'disabled' property so the setter setDisabled will not work. However it does have a enabled property so you could use the setEnabled method.
sap.ui.getCore().byId("xxx").setEnabled(false); //Disables the control
If you want to prevent the user from editing the Input value, you should set it's editable
property to false using the Input's method setEditable(false).