ui.bootstrap.datepicker is-open 不工作在模态 [英] ui.bootstrap.datepicker is-open not working in modal
本文介绍了ui.bootstrap.datepicker is-open 不工作在模态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 Bootstrap UI 日期选择器指令,并且我正在尝试使用一个日期选择器按钮来像原始示例中一样打开日期选择器弹出窗口,但它在模式窗口中不起作用.
参见PLUNKER
我做错了什么?
解决方案
只需更改为:is-open="opened"
即可:
is-open="$parent.opened"
固定演示 Plunker知识库>
因此相关的 HTML 片段将如下所示:
<input type="text" class="form-control"datepicker-popup="dd.MM.yyyy"ng-model="dt"is-open="$parent.opened"ng-required="true"close-text="关闭"/><span class="input-group-btn"><button style="height:34px;"class="btn btn-default" ng-click="open()"><i class="icon-calendar"></i></button><b><- 按钮不起作用</b></span>
I´m using the Bootstrap UI datepicker directive and I´m trying to have an datepicker button that opens the datepicker popup like in the original example but it does not work in a modal window.
See PLUNKER
What am I doing wrong?
解决方案
Just change to: is-open="opened"
to:
is-open="$parent.opened"
Fixed Demo Plunker
So relevant snippets of HTML will look like:
<div class="input-group">
<input type="text" class="form-control"
datepicker-popup="dd.MM.yyyy"
ng-model="dt"
is-open="$parent.opened"
ng-required="true"
close-text="Close" />
<span class="input-group-btn">
<button style="height:34px;" class="btn btn-default" ng-click="open()">
<i class="icon-calendar"></i></button> <b><- button not working</b>
</span>
</div>
这篇关于ui.bootstrap.datepicker is-open 不工作在模态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文