I have a button on a page that calls a modal having datepicker.
If this button is at top (I don\'t have to scroll page to click), modal opens and datepicker displays
This solutions worked perfectly for me to render the datepicker on top of bootstrap modal.
http://jsfiddle.net/cmpgtuwy/654/
HTML
Some content goes here
Some more content.
  
  
Javascript
$('#dtp').datetimepicker({
format: 'MMM D, YYYY',
widgetParent: 'body'});
$('#dtp').on('dp.show', function() {
      var datepicker = $('body').find('.bootstrap-datetimepicker-widget:last');
      if (datepicker.hasClass('bottom')) {
        var top = $(this).offset().top + $(this).outerHeight();
        var left = $(this).offset().left;
        datepicker.css({
          'top': top + 'px',
          'bottom': 'auto',
          'left': left + 'px'
        });
      }
      else if (datepicker.hasClass('top')) {
        var top = $(this).offset().top - datepicker.outerHeight();
        var left = $(this).offset().left;
        datepicker.css({
          'top': top + 'px',
          'bottom': 'auto',
          'left': left + 'px'
        });
      }
    });
CSS
.wrapper {
height: 100px;
overflow: auto;}
body {
position: relative;
}