DateTimpicker not showing properly in jquery ui layout

173 Views Asked by At

How can I make the datetimepicker work properly in the jquery ui layout. the datetimepicker is not showing when I click on the textfield it is behind in the south pane.

see fiddle

<div class="ui-layout-north">North</div>
<div class="ui-layout-south">
  <div class="container">
    <div class="row">
        <div class='col-sm-6'>
            <div class="form-group">
                <div class='input-group date' id='datetimepicker1'>
                    <input type='text' class="form-control" />
                    <span class="input-group-addon">
                        <span class="glyphicon glyphicon-calendar"></span>
                    </span>
                </div>
            </div>
        </div>

    </div>
</div>


$(function(){
 $('body').layout({ applyDemoStyles: true });
      $('#datetimepicker1').datetimepicker();
});

Thank you in advance.

1

There are 1 best solutions below

5
Ketan On

moment.js was missing in your code. I have changed it & now its working fine. Here is the updated fiddle.

$(function(){
 $('body').layout({ applyDemoStyles: true });
      $('#datetimepicker1').datetimepicker();
});

You will have to update your code to display datetimepicker properly. You can refer https://eonasdan.github.io/bootstrap-datetimepicker/Options/ for more formatting.