gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-28 11:35:53 28 4
gpt4 key购买 nike

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

我需要三个日期、月份、年份的下拉菜单,就像这个组件所具有的那样(如果您查看 index.html),当您打开这个示例时它可以工作,但是当我尝试实现它时它可以正常工作(js 部分) ,除了 css 不起作用(它不像示例中那样),现在我知道我包含了所有 css 和 js 文件。我也试过他的 Bootstrap css(他包括在内)然后它起作用了(下拉菜单看起来像他的),但它扰乱了我所有的其他页面。现在我的问题是,是否有一个简单的解决方案来解决这个问题(我是新手) bootstrap),或者是否有另一个组件用于相同的事情,或者我应该只采用标准下拉菜单并用 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>

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

关于css - bootstrap 组件(用于三个下拉列表中的日期、月份、年份)compulsar/bootstrap-datepicker-select css 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27834375/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com