JSFiddle - React, Tailwind, and code Playground

HTML

<label>Parent is an Alumnus (old Boy) of this school </label> &nbsp; &nbsp;
<input type='radio' name='XIAlmnus' value='Yes' id="XIyes"/>Yes
<input type='radio' name='XIAlmnus' value='No' id="XIno"/>No

<label>If Yes, Year of passing </label> &nbsp; &nbsp;
<input type="textbox" name="XIyop" id="XIyop" />

JavaScript

$(function() {
    window.invalidate_input = function() {
        if ($('input[name=XIAlmnus]:checked').val() == "Yes")
            $('#XIyop').removeAttr('disabled');
        else
            $('#XIyop').attr('disabled', 'disabled');
    };
    
    $("input[name=XIAlmnus]").change(invalidate_input);
    
    invalidate_input();
});