title: How to enable container in bootstrap datepicker to append to a specific element?
body: <p>How would you add specify the container option in bootstrap datepicker to enable the datepicker to append to a specific element?</p>
  
  <p>I added the container option but its not working i.e. the datepicker is not opening when I add it. When I remove the container option, it defaults to body and the datepicker shows up fine.</p>
  
  <p>I really want to enable the datepicker to append to only a specific element and stay fixed on scrolling but its not working at all i.e. the datepicker moves along with the scroll. Its really frustrating.</p>
  
  <p>Here is the datepicker code,</p>
  
  <pre><code>$('#StartDate').bootstrapDP({ 
  format: 'mm/dd/yyyy',
  startDate: defaultDate,
  container: '#StartDate",
  todayBtn: 'linked',
  clearBtn: true,
  beforeShowDay: function(Date){
  
      var curr_day = Date.getDate();
      var curr_month = Date.getMonth()+1;
      var curr_year = Date.getFullYear();        
      var curr_date=curr_month+','+curr_day+','+curr_year;    
  
      if(!(typeof nat_arr == "undefined")){
  
          if (nat_arr.indexOf(curr_date)&gt;-1) return false;
      }
  
  },
  daysOfWeekDisabled: [0,6],
  todayHighlight: true
  }).on('changeDate',dateChanged);
  </code></pre>
  
  <p>I tried all ends. I debugged the Jquery UI JS and found out that the issue has to do with something like display block not being appended when container added but i am not sure.</p>
  
  <p>Please help me, it would be very kind!</p>