twitter-bootstrap boostrap 组件(用于三个下拉列表中的日期、月份、年份) sompylasar/bootstrap-datepicker-select css 不起作用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27834375/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 22:05:51  来源:igfitidea点击:

boostrap component (for date,month,year in three dropdowns) sompylasar/bootstrap-datepicker-select css not working

csstwitter-bootstrap

提问by MePo

Here is the component https://github.com/sompylasar/bootstrap-datepicker-select

这是组件https://github.com/sompylasar/bootstrap-datepicker-select

I need three dropdowns for date, month, year like this component has (if you look in index.html) and when you open this example it works, but when i tried to implement it works as it should (js part), except css doesnt work (it isnt as in example), now i know i included all css and js files. And also ive tried with his bootstrap css (which he included) and then it works (dropdowns look like his), but it disrupts all my other pages.Now for my question, is there a simple solution to fix this problem (im new to bootstrap),or is there another component for the same thing or should i just take standard dropdowns and fill them with date, month, year with foreach. Thank you in advance

我需要三个日期、月份、年份的下拉菜单,就像这个组件一样(如果你查看 index.html),当你打开这个例子时,它可以工作,但是当我尝试实现它时,它可以正常工作(js 部分),除了 css不起作用(它不像示例中那样),现在我知道我包含了所有 css 和 js 文件。而且我也尝试过他的引导 css(他包括在内)然后它工作(下拉看起来像他的),但它破坏了我所有的其他页面。现在我的问题是,是否有一个简单的解决方案来解决这个问题(我是新来的) bootstrap),或者是否有其他组件用于相同的事情,或者我应该采用标准下拉列表并用foreach填充日期,月份,年份。先感谢您

采纳答案by MePo

i went with the classic approach with foreach

我采用了 foreach 的经典方法

                    <div class="form-group">
                        <label for="selectDate">Date of Birth:</label>
                        <select id="selectDate" style="width:auto;" class="form-control selectWidth">
                            @for ($i = 1; $i <= 31; $i++)
                            <option class="">{{$i}}</option>
                            @endfor
                        </select>
                        <select id="selectMonth" style="width:auto;" class="form-control selectWidth">
                            @for ($i = 1; $i <= 12; $i++)
                            <option class="">{{$i}}</option>
                            @endfor
                        </select>
                        <select id="selectYear" style="width:auto;" class="form-control selectWidth">
                            @for ($i = 1900; $i <= 2015; $i++)
                            <option class="">{{$i}}</option>
                            @endfor
                        </select>
                    </div>

If anyone figures out that plugin please write it in comments or as an answer.

如果有人发现该插件,请将其写在评论中或作为答案。