模态内网格上的角度数据选择器

时间:2015-03-30 22:43:24

标签: angularjs ng-grid bootstrap-datepicker

AngularJS:当控件位于模态中的ngGrid内时,日期选择器不起作用。它充当输入文本控件,因为日历弹出窗口不会在焦点上弹出。

$scope.myData = [
      {"id":1,"name": "AAA", "Regdate": "1/10/2012"},
      {"id":2,"name": "BBB", "Regdate": "2/10/2012"},
      {"id":3,"name": "CCC", "Regdate": "3/10/2012"}];

$scope.gridOptions = { 
  data: 'myData',
  columnDefs:[
        {field:"id",displayName:"ID",width:50},
        {field:"name",displayName:"Name",width:100},
        {field:"Regdate",displayName:"Reg-Date",
        cellTemplate:'<input type="text" ng-model="COL_FIELD" datepicker-popup="dd-MM-yyyy" datepicker-append-to-body=true />',
        enableCellEdit:true}
    ]
};

Plunkr: http://plnkr.co/edit/YtRVFegiB6Slj2NtC7ME?p=preview

建议请。

0 个答案:

没有答案