Bootstrap 3 日期时间选择器小部件位置 [英] Bootstrap 3 datetimepicker widget position

查看:37
本文介绍了Bootstrap 3 日期时间选择器小部件位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 bootstrap 3 硅藻土选取器小部件,但我无法控制它的位置.现在,当我不使用水平和垂直选项时,小部件显示在我的页面底部,但是当我使用水平和垂直选项时,我收到一条错误消息,指出水平不是有效选项.

I am using bootstrap 3 diatomite picker widget, but I am unable to control its position. Right now the widget appears at the bottom of my page when I don't use horizontal and vertical options, but when I use horizontal and vertical options I get an error saying horizontal is not a valid option.

这些选项对我不起作用:

水平:'正确',
垂直:'顶部'

These options are not working for me:

horizontal: 'right',
vertical: 'top'

这是我的代码:

enter code here
<input type="text" value="<fmt:formatDate value="${visitDetail.visitDate }" pattern="dd-MM-yyyy hh:mm aaa" />" name="patient.visitDetails[${status.index}].visitDate" class="form-control" id="visitDate${status.index}" placeholder="visitDate${status.index}"> 


<script type="text/javascript">
    $(function () {
        $("#visitDate${status.index}").datetimepicker({
            showTodayButton: true,
            inline: false,
            format: "DD-MM-YYYY hh:mm A",
            sideBySide: true,
            horizontal: 'right',
            vertical: 'top'
        });
    });
</script>

推荐答案

$('.date').datetimepicker({
    language: 'es',
    format: 'dd/mm/yyyy',
    autoclose: 1,
    weekStart: 1,
    startView: 2,
    todayBtn: 1,
    todayHighlight: 1,
    forceParse: 0,
    minView: 2,
    pickerPosition: "top-left"
});

这篇关于Bootstrap 3 日期时间选择器小部件位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆