Sredny M Casanova
Sredny M Casanova

Reputation: 5063

changing orientation in Bootstrap Datetimepicker

I'm tryin to change the orientation of the Bootstrap Datetimepicker I even tried with this but I get:

option orientation is not recognized

My definition of the datetimepicker in the html is:

<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 the 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.

Upvotes: 9

Views: 10257

Answers (1)

Sredny M Casanova
Sredny M Casanova

Reputation: 5063

After reading a lot of post, and the documentation, I made it! for future visitors, can read all the available option here and for this specific example, I made:

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

Now, all the time I have the datetimepicker in the bottom of the input, and this is just what I wanted.

Upvotes: 15

Related Questions