twitter-bootstrap Bootstrap 3.0 RC1 兼容日期选择器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17990532/
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 17:48:05  来源:igfitidea点击:

Bootstrap 3.0 RC1 compatible datepicker

twitter-bootstrapdatepicker

提问by Fer García

Start learning Bootstrap. I'm writing a site prototype for my work, and I need a datepicker component. Someone knows a component that is compatible with the new version of Bootstrap, 3.0 RC1? Thanks in advance.

开始学习 Bootstrap。我正在为我的工作编写站点原型,我需要一个日期选择器组件。有人知道新版Bootstrap 3.0 RC1 兼容的组件吗?提前致谢。

回答by Fer García

Finally I found a viable BS3 datepicker component here; it's a WIP but that's acceptable as I'm in the prototype phase of my project. I hope someone could find this helpful.

最后我在这里找到了一个可行的 BS3 datepicker 组件;这是一个 WIP,但这是可以接受的,因为我正处于项目的原型阶段。我希望有人能发现这有帮助。

Btw this component isn't still listed in the gallery of Bootstrap components, Bootsnipp.

顺便说一句,这个组件仍然没有列在 Bootstrap 组件的库中,Bootsnipp

EDIT- This component is now listed at Bootsnipp

编辑- 该组件现在在Bootsnipp 上列出

EDIT- This is compatible with the latest stable version of BS3.

编辑- 这与 BS3 的最新稳定版本兼容。

回答by Hamdi Baligh

You can use the standard and well know jquery Ui datepicker, it is well documented http://jqueryui.com/datepicker/this works fine with bootstrap since this comes naturally with jquery-ui.min.js You can use it simply by puting this script

你可以使用标准的和众所周知的 jquery Ui datepicker,它有很好的文档记录 http://jqueryui.com/datepicker/这适用于引导程序,因为这与 jquery-ui.min.js 很自然你可以通过放置来使用它这个脚本

$(document).ready(function () {
$('.date').datepicker({ //Your options here });
)};

with <input class="date" />

<input class="date" />

Edit

编辑

BootStrap Has it's own datePicker https://github.com/eternicode/bootstrap-datepickerthis is if you want to use a common layout

BootStrap 有它自己的 datePicker https://github.com/eternicode/bootstrap-datepicker如果你想使用一个通用的布局