如何将日期信息发送到数据表中的按钮。
$(function () {
$('#table').DataTable({
ajax: {
"url": "https://api-sandbox.londontheatredirect.com/rest/v2/Events/" + showId + "/Performances",
},
columns: [
{ data: 'PerformanceId' },
{ data: 'PerformanceDate' }
]
});
/**/
});
答案 0 :(得分:0)
$(function () {
$('#table').DataTable({
ajax: {
"url": "https://api-sandbox.londontheatredirect.com/rest/v2/Events/" + showId + "/Performances",
},
columns: [
{ data: 'PerformanceId' },
{ data: 'PerformanceDate' },
/*Here the code how you render your html button, a tag or anything else*/
{
"render": function (data, type, row, meta)
{ return '<a href="your_url" class="btn btn-sm btn-info">Button name</a>'; }
}
]
});
/**/
});