JSFiddle - React, Tailwind, and code Playground

by Rafael Boschini

HTML

<select name='options'>
  <option value="a">A</option>
  <option value="b">B</option>
  <option value="c">C</option>
</select>  

<input class="input" type="text" id="a" value="this is a"/>
<input class="input" type="text" id="b" value="this is b"/>
<input class="input" type="date" id="c"/>

JavaScript

$(document).ready(function(){
    $('.input').hide();
    $("select[name='options']").val(-1);
    $("select[name='options']").change(function(){
        $('.input').hide();
   		$('#'+$(this).val()).show();
    });
});