Change orientation in Bootstrap Datetimepicker

I am trying to change the orientation of Bootstrap Datetimepicker. I even tried with this , but I get:

option orientation is not recognized

My definition of datetimepicker in html:

<div class='input-group date datepicker' name="datepicker">
    <input type='text' class="form-control placementT" id="fecha">
         <span class="input-group-addon">
               <span class="glyphicon glyphicon-calendar">
               </span>
         </span>
</div>

In javascript, I have something like this to change the language:

$('.input-group.date').datetimepicker({
            locale: "es",
        });

I tried adding location:'bottom auto', but nothing happens.

+4
source share
1 answer

After reading a lot of posts and documentation, I did it! for future visitors, you can read all the available options here , and for this specific example I did:

 $('.input-group.date').datetimepicker({
            widgetPositioning:{
                                horizontal: 'auto',
                                vertical: 'bottom'
                            }
        });

, datetimepicker , , .

+6

Source: https://habr.com/ru/post/1619964/


All Articles