title: jQuery Datepicker - Enable submit button only if start-end date are not empty
body: <pre><code>$('#datepicker_start').datepicker({
           dateFormat: 'd-M-y' ,
           onSelect: function(selected) {
                $("#datepicker_end").datepicker("option","10-03-2015", selected)
              }
      });
  
  
  $('#datepicker_end').datepicker({
           dateFormat: 'd-M-y' ,
           onSelect: function(selected) {
                $("#datepicker_start").datepicker("option","09-04-2015", selected)
              }
      });
  
  
  &lt;button class="btn" id="btn_submit" type="button" disabled="disabled"&gt;Submit&lt;/button&gt; 
  
  
          //enable 'Submit' button only if start-end dates both are not empty
          if( $('#datepicker_start').val().length !=0 &amp;&amp; $('#datepicker_end').val().length !=0 ){
              $('#btn_submit').attr('disabled', false);            
          }else{
              $('#btn_submit').attr('disabled',true);
          }
  </code></pre>
  
  <p>The above does not checks the start-end dates input when date is selected from calendar but on document load. How to check input value is empty or not when date is selected from datepicker</p>