Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap: How to add dropdown.less?

I need to add a calendar into a form. I want to install this project: https://github.com/vitalets/bootstrap-datepicker

But it is said that: Requires bootstrap’s dropdown component (dropdowns.less) for some styles, and bootstrap’s sprites (sprites.less and associated images) for arrows.

How can i add that files to my app?

Thank you very much!

like image 774
FrancescoMussi Avatar asked Oct 09 '13 12:10

FrancescoMussi


People also ask

How do I add a drop down menu in Bootstrap?

To open the dropdown menu, use a button or a link with a class of . dropdown-toggle and the data-toggle="dropdown" attribute. The . caret class creates a caret arrow icon (), which indicates that the button is a dropdown.

How set dropdown position in Bootstrap?

By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add . dropdown-menu-right to a . dropdown-menu to right align the dropdown menu.

How do I increase the size of my drop down menu?

The simple solution is to widen the column that the drop-down box is in. You can adjust the column manually by dragging the border of the column header.

How do I move a drop down to left in Bootstrap?

To override it, use . dropdown-menu-left.


1 Answers

You have to download and include the following assets.

CSS

http://getbootstrap.com/2.3.2/assets/css/bootstrap.css

http://getbootstrap.com/2.3.2/assets/css/bootstrap-responsive.css

http://eternicode.github.io/bootstrap-datepicker/bootstrap-datepicker/css/datepicker.css

JS

http://code.jquery.com/jquery.js

http://getbootstrap.com/2.3.2/assets/js/bootstrap.js

http://eternicode.github.io/bootstrap-datepicker/bootstrap-datepicker/js/bootstrap-datepicker.js

Then in html, use like this.

<input data-provide="datepicker">

Demo here

Please note that, I have given bootstrap 2.3 here.

like image 190
Anshad Vattapoyil Avatar answered Oct 11 '22 18:10

Anshad Vattapoyil