1
在下面的鏈接中提供了一個包含日期選擇器(列日期)的UI網格。這裏我們不能手動輸入日期。請提供一個解決方案,在日期選擇器如何在用戶界面中手動輸入日期編輯日期選擇器
http://plnkr.co/edit/4mNr86cN6wFOLYQ02QND?p=preview
$scope.data = [];
var generateData = function() {
for (var i = 0, i_length = 30; i < i_length; i++) {
$scope.data.push({
"firstName": "Cox",
"lastName": "Carney",
"company": "Enormo",
"date": '10/14/2015 02:45:33 AM'
});
$scope.data.push({
"firstName": "Lorraine",
"lastName": "Wise",
"company": "Comveyer",
"date": '10/15/2015 10:52:54 AM'
});
$scope.data.push({
"firstName": "Nancy",
"lastName": "Waters",
"company": "Fuelton",
"date": '09/09/2014 07:32:11 AM'
});
}
}();
$scope.gridOptions = {
enableGridMenu: true,
data: 'data',
columnDefs: [
{ name: 'First Name', field: 'firstName' },
{ name: 'Last Name', field: 'lastName'},
{ name: 'Company', field: 'company' },
{ name: 'Date',
field: 'date',
cellFilter: 'textDate:"M/d/yyyy"',
editableCellTemplate: '<div><form name="inputForm"><div ui-grid-edit-datepicker row-field="MODEL_COL_FIELD" ng-class="\'colt\' + col.uid"></div></form></div>'
}
],
enableCellEditOnFocus: true
};
通過手動編輯,你的意思是用戶輸入日期? –
是的,用戶需要選擇輸入日期以及從datepicker中選擇日期 – Thomas