带有日期和ng-repeat的Angular-xeditable Editable(Bs3) [英] Angular-xeditable Editable (Bs3) with date and ng-repeat

查看:81
本文介绍了带有日期和ng-repeat的Angular-xeditable Editable(Bs3)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试扩展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/)

  1. 我在jsfiddle的资源和模块中都添加了ui-bootstrap缺少的依赖项.
  2. 还添加了e-is-opene-ng-click属性,就像在angular-xeditable的示例中一样,
  1. I added the missing dependency of ui-bootstrap, both to the jsfiddle's resources and to the module.
  2. Also added e-is-open and e-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屋!

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