Twitter Bootstrap datetimepicker天垂直 - LESS导入?

时间:2012-05-14 15:36:10

标签: javascript html twitter-bootstrap less

http://i.stack.imgur.com/vK4OB.png

目前我的显示器是这样的。

我有一个母版页面,用于导入我的css和js。

<link href="assets/css/datepicker.css" rel=Stylesheet />
<link href="assets/css/bootstrap-responsive.css" rel=Stylesheet />
<link href="assets/css/bootstrap.css" rel=Stylesheet />
<link href="assets/css/docs.css" rel=Stylesheet />
<link href="assets/less/bootstrap.less" type="text/css" rel="Stylesheet/less" />

在头部和javascript:

<script src="assets/js/less-1.3.0.min.js" type="text/jscript"></script>
<script src="assets/js/jquery.js" type="text/jscript"></script>
<script src="assets/js/bootstrap-transition.js" type="text/jscript"></script>
<script src="assets/js/bootstrap-alert.js" type="text/jscript"></script>
<script src="assets/js/bootstrap-modal.js" type="text/jscript"></script>
<script src="assets/js/bootstrap-dropdown.js" type="text/jscript"></script>
<script src="assets/js/bootstrap-scrollspy.js" type="text/jscript"></script>
<script src="assets/js/bootstrap-tab.js" type="text/jscript"></script>
<script src="assets/js/bootstrap-tooltip.js" type="text/jscript"></script>
<script src="assets/js/bootstrap-popover.js" type="text/jscript"></script>
<script src="assets/js/bootstrap-button.js" type="text/jscript"></script>
<script src="assets/js/bootstrap-collapse.js" type="text/jscript"></script>
<script src="assets/js/bootstrap-carousel.js" type="text/jscript"></script>
<script src="assets/js/bootstrap-datepicker.js" type="text/jscript"></script>
<script src="assets/js/bootstrap-typeahead.js" type="text/jscript"></script>
<script>
  $('#datepicker').datepicker();
</script>

控件:

<div class="input-append date" id="datepicker" data-date="12-02-2012"
data-date-format="dd-mm-yyyy">
<input size="16" type="text" value="12-02-2012" readonly>
<span class="add-on"><i class="icon-th"></i></span> </div>

希望这些日子应该是水平的,不知道我错过了什么?

1 个答案:

答案 0 :(得分:2)

我认为您需要 DEMO

<强> HTML:

<div class="input-append date" id="dp3" data-date="12-02-2012" data-date-format="dd-mm-yyyy">
  <input class="span2" size="16" type="text" value="12-02-2012">
  <span class="add-on"><i class="icon-th"></i></span>
</div>​

<强>脚本:

$('#dp3').datepicker();
var startDate = new Date(2012,1,20);
var endDate = new Date(2012,1,25);​