title: how to set MinDate and maxDate property of datetimepicker in bootstrap
body: <p>i want to set minDate and maxDate property dynamically for datetimepicker in bootstrap,please help me out in this.</p>
  
  <p>in this scenario, while while selecting the date in one datetimepicker it should set that selected date as minDate for other datetimepicker.</p>
  
  <p>and after selecting the date in second datetimepicker,its selected date should become maxDate in first date time picker.</p>
  
  <p>i tried this way:</p>
  
  <pre><code>$(document).ready(function(){
        $(".form_datepicker_startdate").datetimepicker({         
         isRTL: App.isRTL(),
                  format: "yyyy-mm-dd",
                  weekStart: 1,
                  todayBtn:  1,
            autoclose: 1,
            todayHighlight: 1,
            startView: 2,
            minView: 2,
            startDate:'&lt;%= request.getSession().getAttribute("startdate") %&gt;',
            endDate:'&lt;%= request.getSession().getAttribute("enddate") %&gt;',
            forceParse: 0,
                  pickerPosition: (App.isRTL() ? "bottom-right" : "bottom-left")          
             }).on('changeDate', function (selected) {
                  var minDate = new Date(selected.date.valueOf());
                  $('.form_datepicker_enddate').datepicker('setMinDate', minDate);
              });
  
  
  $(".form_datepicker_enddate").datetimepicker({         
         isRTL: App.isRTL(),
                  format: "yyyy-mm-dd",
                  weekStart: 1,
                  todayBtn:  1,
            autoclose: 1,
            todayHighlight: 1,
            startView: 2,
            minView: 2,
            startDate:'&lt;%= request.getSession().getAttribute("startdate") %&gt;',
            endDate:'&lt;%= request.getSession().getAttribute("enddate") %&gt;',
            forceParse: 0,
                  pickerPosition: (App.isRTL() ? "bottom-right" : "bottom-left")          
             }).on('changeDate', function (selected) {
                  var maxDate = new Date(selected.date.valueOf());
                  $('.form_datepicker_startdate').datepicker('setMaxDate', maxDate);
              });
       });
  </code></pre>