JSFiddle - React, Tailwind, and code Playground
HTML
<input id="foo" type="text" disabled="disabled">
<input type="button" value="Disable">
<input type="button" value="Enable">
JavaScript
$('[value=Disable]').click(function(){
$('#foo').prop('disabled','disabled');
})
$('[value=Enable]').click(function(){
$('#foo').removeAttr('disabled');
});