title: Jquery change function is not working
body: <p>Initially I have disabled <code>To date</code> field,After selecting <code>From date</code> only I want to allow it to choose.I wrote code for that,But its not working.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function() {
    $('#levTo').attr('disabled', 'true');
    $('#levFrom').change(function() {
      $('#levTo').attr('disabled', 'false');
    })
    pastDaysdisable()
  });
  
  function pastDaysdisable() {
    var dtToday = new Date();
    var month = dtToday.getMonth() + 1;
    var day = dtToday.getDate();
    var year = dtToday.getFullYear();
    if (month &lt; 10)
      month = '0' + month.toString();
    if (day &lt; 10)
      day = '0' + day.toString();
  
    var maxDate = year + '-' + month + '-' + day;
    $('#levFrom,#levTo').attr('min', maxDate);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="col-lg-4 col-md-4 col-sm-4 col-xs-12"&gt;
    &lt;label class="col-xs-12"&gt;Date From&lt;/label&gt;
    &lt;input type="date" id="levFrom" class="col-xs-12 form-control levFrom required"&gt;
  &lt;/div&gt;
  
  &lt;div class="col-lg-4 col-md-4 col-sm-4 col-xs-12"&gt;
    &lt;label class="col-xs-12"&gt;Date To&lt;/label&gt;
    &lt;input type="date" id="levTo" class="col-xs-12 form-control levTo required"&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Also,I am trying to restrict <code>To date</code> based on <code>From date</code><br>
  <code>To date</code> should not allow to select the date before <code>from date</code> which I have choosed.How to do it?<br>
  I know its possible in date picker.But,I want to achieve it in <code>input type=date.</code></p>