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.
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.
Bootstrap 5 DateTimepicker. DateTimepicker is a form that adds the function of selecting date and time without the necessity of using custom JavaScript code.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With