2017-04-10 30 views
0

这里是我的代码与引导表table-responsive其中数据由ajax填充。在此日期排序为字符串不更新,请大家帮我dd/MM/yyyy格式整理日期:你引导表排序日期不起作用

<table class="table table-bordered table-responsive" data-pagination="true" data-search="true" id="usageTable"> 
    <tr> 
     <th data-field="servicealias" data-sortable="true"><spring:message code ="label.service" /></th> 
     <th data-field="callStartDate" data-sortable="true"><spring:message code ="label.callstart" /></th> 
     <th data-field="callEndDate" data-sortable="true"><spring:message code ="label.callend" /></th> 
     <th data-field="sessiontime" data-sortable="true"><spring:message code ="label.sessiontime" /></th> 
    </tr>      
</table> 

回答

0

检查是否已包括jQuery的在参考当前版本。

<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.min.js"></script> 
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.4.0/bootstrap-table.min.css" /> 
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/css/bootstrap.min.css" /> 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> 
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/js/bootstrap.min.js"></script> 
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.4.0/bootstrap-table.min.js"></script> 

您也可以使用下面的示例中使用排序的javascript

jsfiddle