title: Want to show/hide text box having date picker when certain value is selected from drop down
body: <p>I have one drop down in which i have value Indian and Others, when i select Others from the Drop down then i want to show three text box in which two are having date picker and the third one is simple text box.
  I have written following code in html but i m not getting Date picker in it. Tried a lot. And again when i click on Indian these three text box should hide and at the time of page loading these three text box should be hidden.
  I have this following imported file in my jsp for calendar.
  visafromdate and visatodate are to be datepicker.</p>
  
  <pre><code>    &lt;script language="javascript" src="/js/reseller/popcalendar.js"&gt;&lt;/script&gt;
      &lt;link href="/css/reseller/popcalendar.css" rel="stylesheet" type="text/css"&gt;
  </code></pre>
  
  <p>Following Java script for validation for showing/hiding &amp; date picker</p>
  
  <pre><code>    $(".visafromdate").each(function(){
          $(this).datepicker();
      });
  
      $(".visatodate").each(function(){
        $(this).datepicker();
      });   
  
  
      $('#nationality').change(function(){
         if($(this,':selected').val()=="indian")
         {
            $('label[for=other_nationality],input#other_nationality').hide();
            $('#othernationality').hide();
            $('label[for=visa_from_date],input#visa_from_date').hide();
            $('#visafromdate').hide();
            $('label[for=visa_to_date],input#visa_to_date').hide();
            $('#visatodate').hide();
         }
         if($(this,':selected').val()=="others")
         {
              $('#othernationality').show();
              $('label[for=other_nationality],input#other_nationality').show();
              $('#visafromdate').show();
              $('label[for=visa_from_date],input#visa_from_date').show();
              $('#visatodate').show();
              $('label[for=visa_to_date],input#visa_to_date').show();
  
         }
    });
    $('label[for=other_nationality],input#other_nationality').hide();
    $('#othernationality').hide();
    $('label[for=visa_from_date],input#visa_from_date').hide();
    $('#visafromdate').hide();
    $('label[for=visa_to_date],input#visa_to_date').hide();
    $('#visatodate').hide();`
  </code></pre>
  
  <p>And this i have written in the form tag</p>
  
  <p></p>
  
  <pre><code>&lt;label for="visa_from_date"&gt;Visa From Date&lt;/label&gt;
  &lt;input type ="text" id="visafromdate"/&gt;
  
  &lt;label for="visa_to_date"&gt;Visa To Date&lt;/label&gt;
  &lt;input type ="text" id="visatodate"/&gt;
  
  &lt;label for="other_nationality"&gt;Other Nationality&lt;/label&gt;
  &lt;input type ="text" id="othernationality"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>Can you please help me with it why it is not working?</p>