twitter-bootstrap 用于放置日期选择器的引导程序日期选择器方向语法

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

bootstrap datepicker orientation syntax for placement of the datepicker

twitter-bootstrapdatepicker

提问by CaptRisky

Does anyone know the syntax for setting the orientation propertyorientation property for the bootstrap datepicker?

有谁知道为 bootstrap datepicker设置orientation 属性orientation 属性的语法?

Here is my jquery:

这是我的jQuery:

$(function() {
    $("#dp3").datepicker({
        orientation: 'top right'
    });
});

Datepicker works fine but can't change the orientation all, any help would be appreciated.

Datepicker 工作正常,但不能全部改变方向,任何帮助将不胜感激。

Html looks like:

Html 看起来像:

<div class="control-group">                                         
    <label class="control-label" for="birthday">Birthday</label>
    <div class="controls">
        <div class="input-append date" id="dp3" data-date="12-02-2012" data-date-format="dd-mm-yyyy">
            <input class="date-input-large" size="16" type="text" value="12-02-2012">
            <span class="add-on"><i class="icon-calendar"></i></span>
        </div>
    </div> <!-- /controls -->               
</div>

回答by Ankit Jain

Bootstrap datapicker plugin just support left orientation. You can check the original code here. However, it has some smartness to keep it in view.

Bootstrap 数据选择器插件只支持左方向。您可以在此处查看原始代码。但是,将其保持在视野中具有一定的智慧。

All you can use is:

您可以使用的是:

$("#dp3").datepicker({
    orientation: 'left'
});

orientation as right, topare not supported.

取向righttop不被支持。