为什么我的 UI Bootstrap datepicker-popup 停止工作? [英] Why did my UI Bootstrap datepicker-popup stop working?

查看:29
本文介绍了为什么我的 UI Bootstrap datepicker-popup 停止工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我更新到 UI Bootstrap 0.11.0 并且我的日期选择器不再像他们应该的那样出现.我有一个 plunker,可以在 此处 演示它.很简单,我有:

I updated to UI Bootstrap 0.11.0 and my datepickers stopped appearing as they should. I have a plunker that demonstrates it at here. Very simply, I have:

<input ng-model="formData.dueDate" type="text" id="dueDate" name="dueDate"
    class="form-control" datepicker-popup="MM-dd-yyyy"
    datepicker-append-to-body="true">

日期选择器使用 UI Bootstrap 0.10.0 正确弹出,但不是最新版本.我在控制台中没有看到任何错误.

The datepicker pops up correctly using UI Bootstrap 0.10.0 but not with the lastest version. I do not see any errors in the console.

这让我相信我可能在以前的版本中错误地使用了日期选择器,或者他们已经出现了回归.我在这里做错了吗?

This leads me to believe I was possibly using the datepicker incorrectly in the previous version or they've had a regression. Am I doing something wrong here?

更新:

我已经在下面提供了答案.已从 UI Bootstrap 日期选择器中删除焦点时显示和点击时显示.

I've included the answer below. Show on focus and show on click have been removed from UI Bootstrap datepicker.

推荐答案

该功能已从 UI Bootstrap 中删除.请参阅 https://github.com/angular-ui/bootstrap/issues/2149 了解更多信息.我在 http://plnkr.co/edit/ct46CK6NRb9FWdpzfQpI?p 创建了另一个 Plunk 来演示解决方法=预览.

The feature was removed from UI Bootstrap. See https://github.com/angular-ui/bootstrap/issues/2149 for more information. I have created another Plunk to demonstrate the workaround at http://plnkr.co/edit/ct46CK6NRb9FWdpzfQpI?p=preview.

这篇关于为什么我的 UI Bootstrap datepicker-popup 停止工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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