要求Bootstrap日期选择器始终处于打开模式 [英] Require Bootstrap date picker always in open mode

查看:63
本文介绍了要求Bootstrap日期选择器始终处于打开模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何始终在打开模式下获取要求引导程序"日期选择器?

How can i get Require Bootstrap date picker always in open mode?

我在我的一个应用程序中使用了引导日期选择器.

I am using bootstrap date picker in one of my application.

要求就像日期选择器在页面加载时应打开,并且选择后也应始终处于打开模式.

Requirement is like date picker should be open when page load and it should be always in open mode after selection as well.

我发现它可以通过autoclose:false属性进行管理,但是,如果我单击日期选择器的一侧,它将接近.

I found that it can manageable through autoclose: false property but, if i click out side of date picker it's getting close.

它应该始终处于打开模式.

It should be there always in open mode.

我希望有任何可以使之成为可能的属性,请找到我正在使用的以下功能.

I hope there is any property which can make it possible, Please find following function which i am using.

HTML

 <input type="text" id="select_date" class="selecteShipDate" />

脚本

<script src="assets/js/bootstrap-datepicker.js"></script>                                                                                       
<script type="text/javascript">
    $(function () {
        $('#select_date').datepicker({
            format: 'dd MM yyyy',
            autoclose: false
        })
    });
</script>

推荐答案

看看Mark Amery的答案.这也应该为您工作.

Have a look at Mark Amery's answer. This should work for you too.

$(document).ready(function () {
    $input = $("#select_date");
    $input.datepicker({
        format: 'dd MM yyyy'
    });
    $input.data('datepicker').hide = function () {};
    $input.datepicker('show');
});

我在这里工作演示

这篇关于要求Bootstrap日期选择器始终处于打开模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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