Kendo UI Grid ( http://rniemeyer.github.io/knockout-kendo/web/Grid.html ) との Knockout.js 統合を使用しています。
私の JSON では、次のように表示される日付を返していますOct 06 2015, 03:54 PM -04:00
。
列の種類と形式を format: として指定しました"{0:MM/dd/yyyy HH:mm tt}"
が、完全に無視されているようです。
以下は、kendogrid バインディングの定義です。
<div data-bind="kendoGrid: {
data: projectSubmissions,
dataSource: {
schema: {
model: {
fields: {
SubmissionId: { type: 'number' } ,
FormName: { type: 'string' } ,
IdVersion: { type: 'string' },
SubmittedDateFormatted: { type: 'string'},
SubmittedDate: { type: 'date'},
}
}
}
},
groupable: false,
scrollable: false,
filterable: {
extra: false,
operators: {
string: {
startswith: 'Starts with',
eq: 'Is equal to',
neq: 'Is not equal to'
}
}
},
sortable: true,
pageable: { pageSize: 10 },
columns: [
{
field: 'SubmissionId',
title: 'No.',
width: 70,
}
,{ field: 'FormName', title: 'Form', width:120 }
,{ field: 'IdVersion', title: 'Id/Version', width:100}
,{
field: 'SubmittedDate',
filterable: true,
title: 'Submitted Date',
format: '{0:MM/dd/yyyy HH:mm tt}',
width: 120
}
,{ field: 'Inspector', title: 'Inspector', filterable: true, width:140 }
,{ field: 'CellNo', title: 'Cell No.', width:100, filterable: false }
]
}"></div>