How to make text box first value non editable in React js? User-2072162984 posted Hi I have a text box .I have company name It is like M/S. You can use either the readonly attribute on the tag or add a little CSS. CSS can't "disable" anything. Good explanation can be found here: You can add the attribute Steps to reproduce. Asked 8 months ago. rev2022.11.3.43005. Make sure you use To set the readonly property, we will use a prop() method. How to make text input non-editable using jQuery? Setting the Textbox read only property to true using JavaScript, Input field read-only when it has value from database otherwise when it's null it should be editable. With every relevant event, make a check if the regex still matches. When the input is enabled, it works fine. JAVA Linked List How to loop through with a for loop? The value is not submitted if you set it to disabled. I prefer women who cook good food, who speak three languages, and who go mountain hiking - what if it is a woman who only has one of the attributes? How to use Javascript to access another page's elements? How can I add a key/value pair to a JavaScript object? which Windows service ensures network connectivity? Create a <DatePicker> component with readOnly set to true, e.g. Is there a trick for softening butter quickly? 1.Set the AllowEmptySelection of the dropdown to true. disabled Refer to here for the readonly attribute description. Though if you