I have Thymeleaf code (this code need for me to add parameter for JQuery - DatePicker):
<table th:attr="data-availible-dates=${defoultSetting.avalibleDates}">
now page looks like:
data-availible-dates="[2014-01-09T00:00:00.000, 2014-01-14T00:00:00.000, 2014-01-10T00:00:00.000, 2014-01-23T00:00:00.000, 2014-01-15T00:00:00.000, 2014-01-06T00:00:00.000, 2014-01-24T00:00:00.000, 2014-01-20T00:00:00.000, 2014-01-16T00:00:00.000, 2014-01-21T00:00:00.000, 2014-01-08T00:00:00.000, 2014-01-22T00:00:00.000, 2014-01-17T00:00:00.000, 2014-01-13T00:00:00.000]"
but I wont to convert to milliseconds like this example:
data-availible-dates="[1451170800000, 1452380400000, 1452466800000, 1452553200000]"
Can I use Thymeleaf and make something similar to JsonDeserializer.. which will be convert data to milliseconds before build the page ?
Result:
I decided to send the list of milliseconds, and second I am using now next code in case when need to add variables from server side to JS:
<script type="text/javascript" th:inline="javascript">
/*<![CDATA[*/
var avalibleDates = /*[[${defoultSetting.avalibleDates}]]*/;
/*]]>*/
</script>