title: Bootstrap datepicker change minDate/startDate from another datepicker
body: <p>There are two datepickers in my page and both are of bootstrap. The condition is only that Start date never High with respect to End Date. Means End date Attribute (minDate) must be changed when Start Date changed by datepicker and same when End Date Changed, the minrange of calendar of Start Date datepicker should be according to End Date Value.</p>
  
  <p>I hope you understand my problem</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function(){
    
        $("#startdate").datepicker({
         
          todayBtn:  1,
          autoclose: true,
         
         
        }).on('changeDate', function (selected) {
          var minDate = new Date(selected.date.valueOf());
          $('#enddate').datetimepicker('setStartDate', minDate);
      });
      
          $("#enddate").datepicker();
  });</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;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.0/js/bootstrap-datepicker.min.js"&gt;&lt;/script&gt;
  &lt;link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet"&gt;
  
  
  
  &lt;input type="text" placehoder="Start Date" id="startdate"/&gt;
  &lt;input type="text" placehoder="End Date" id="enddate"/&gt;</code></pre>
  </div>
  </div>
  </p>