W thymeleaf, będzie to wyglądać mniej więcej tak:
Kontroler:
// Create these dates however you want, these example dates are filtering between 1950 and 1960.
GregorianCalendar gc = new GregorianCalendar();
gc.set(Calendar.YEAR, 1950);
model.put("start", gc.getTime());
gc.set(Calendar.YEAR, 1960);
model.put("end", gc.getTime());
Thymeleaf:
<table class="table table-bordered" id="expiredUsersTable" dt:table="true">
<thead>
<tr>
<th dt:sortInitDirection="desc">TIME</th>
<th dt:filterable="true" dt:filterType="select">Log Level</th>
<th>Message</th>
</tr>
</thead>
<tbody>
<tr th:each="log : ${logs}" th:unless="${log.date.before(start) OR log.date.after(end)}">
<td th:text="${log?.formattedDate}"></td>
<td th:text="${log?.level}"></td>
<td th:text="${log?.message}"></td>
</tr>
</tbody>
</table>
Im szuka javascript sposób rozwiązywania tego. Przepraszam, zapomniałem o tym. –