2017-04-10 68 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