带有日期和ng-repeat的Angular-xeditable Editable(Bs3) [英] Angular-xeditable Editable (Bs3) with date and ng-repeat
问题描述
我尝试扩展Angular-xeditable可编辑行(Bs3)的特定示例,并在其中添加出生日期"字段
I try to extend a specific example of Angular-xeditable Editable row (Bs3) adding the field "date of birth"
我创建了一个jsfiddle来描述问题
I've created a jsfiddle to describe the problem
http://jsfiddle.net/ffgj62q0/(正确链接)
<div ng-app="app" ng-controller="Ctrl">
<table class="table table-bordered table-hover table-condensed">
<tr style="font-weight: bold">
<td style="width:35%">Name</td>
<td style="width:20%">Date of b</td>
<td style="width:10%">Status</td>
<td style="width:10%">Group</td>
<td style="width:25%">Edit</td>
</tr>
<tr ng-repeat="user in users">
<td>
<!-- editable username (text with validation) --> <span editable-text="user.name" e-name="name" e-form="rowform" onbeforesave="checkName($data, user.id)" e-required>
{{ user.name || 'empty' }}
</span>
</td>
<td> <a href="#" editable-bsdate="user.dob" e-name="dob" e-datepicker-popup>
{{ (user.dob | date:"dd/MM/yyyy") || 'empty' }}
</a>
</td>
没有出现弹出窗口. :-(
The popup doesn't appear. :-(
我发现此示例适用于一个日期字段.
I found this example that works with one date field.
http://plnkr.co/edit/Y4ilZ4rITYnjAyq2xAUa?p=preview
请问有解决此特定问题的任何提示吗?
Any hint to solve this specific problem, please?
问候 C.
推荐答案
我派出了你的小提琴(还更新了一些资源,例如,在jsfiddle的javascript设置上将angularjs设置为1.4.8-"FRAMEWORKS AND EXTENSIONS",从jsFiddle的外部资源中删除了angular.min.js.
I forked your fiddle (also updated some resources, for example set angularjs to 1.4.8 on the javascript settings of the jsfiddle - "FRAMEWORKS AND EXTENSIONS", and removed angular.min.js from the jsFiddle's external resources).
然后我只是添加了一些缺少的内容,例如在angular-xeditable网站上解释的内容( http://jsfiddle .net/cewm89y3/5/)
And then I just added some missing stuff, like explained on the angular-xeditable site (http://jsfiddle.net/cewm89y3/5/)
- 我在jsfiddle的资源和模块中都添加了
ui-bootstrap
缺少的依赖项. - 还添加了
e-is-open
和e-ng-click
属性,就像在angular-xeditable的示例中一样,
- I added the missing dependency of
ui-bootstrap
, both to the jsfiddle's resources and to the module. - Also added
e-is-open
ande-ng-click
attributes just as in the example from angular-xeditable,
...,在我的小提琴中,日期选择器打开了.
... and in my fiddle the datepicker opens.
这篇关于带有日期和ng-repeat的Angular-xeditable Editable(Bs3)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!