title: hide/show date base on dropdown value
body: <p>I made a php page with a search function that has a dropdown menu that includes student, id, registered_date. Now I have a search bar and a date(start date - end date). I want to show the date picker when a user selects registered_date on the dropdown table, but I don't know how. I know for a fact that they use <code>.show()</code> and <code>.hide()</code> but I don't know how to use it on a selection.</p>
  
  <p>Here is my code so far.</p>
  
  <pre><code>Category&lt;select name="category" id="category"&gt;
          &lt;option value='1' id="1"&gt;Student&lt;/option&gt;
          &lt;option value='2' id="2"&gt;ID&lt;/option&gt;
          &lt;option value='3' id="3"&gt;Registration_date&lt;/option&gt;
          &lt;option value='4' id="4"&gt;Course&lt;/option&gt;
          &lt;/select&gt;
  
  Search Text&lt;input type="text" name="txtsearch" placeholder="Type to Search" /&gt;
      Date Start: &lt;input type="text" id="datepicker" name="date1"&gt;
      Date End: &lt;input type="text" id="datepicker2" name="date2"&gt;
  </code></pre>
  
  <p>Here is my javascript/jquery</p>
  
  <pre><code>&lt;script&gt;
    $(function() {
      $( "#datepicker" ).datepicker({dateFormat: 'yy/mm/dd'});
  
    });
     $(function() {
      $( "#datepicker2" ).datepicker({dateFormat: 'yy/mm/dd'});
    });
  
  
  
  ****I dont know what the code for the hide and show part
  
  &lt;/script&gt;
  </code></pre>