Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 802
Sredny M Casanova Avatar asked Dec 14 '15 18:12

Sredny M Casanova


People also ask

How do I change my Datepicker orientation?

at Datepicker Link, just click the Download Development and get latest JS which include the orientation options. In the JS given defaults are: var defaults = $. fn.

What is bootstrap DateTimepicker?

Bootstrap 5 DateTimepicker. DateTimepicker is a form that adds the function of selecting date and time without the necessity of using custom JavaScript code.


1 Answers

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.

like image 171
Sredny M Casanova Avatar answered Oct 12 '22 03:10

Sredny M Casanova