Spring Freemarker中的日期格式(dd M yyyy)(。ftl)

时间:2014-08-01 16:47:33

标签: jquery spring date

我有一个下拉列表,我需要在spring freemarker(.ftl文件)中显示cid-date(以dd M yyyy)格式。 我的下拉代码......

        <td>:&#160;&#160;
                <select id="appshift" name="shift" onchange="doFetch()">
                    <option value="">-select-</option>
                        <#list extshiftcode as shiftList>
                    <option value="${shiftList.cid}">${shiftList.cid} -${shiftList.fromDate} </option>
                    </#list>        
                </select>
            </td>

任何人都可以建议我如何以dd M yyyy格式显示日期。 我也在使用Jquery,如果有任何想法使用jquery在.ftl文件中更改日期格式。

请建议我。

感谢。

1 个答案:

答案 0 :(得分:1)

<option value="${shiftList.cid}">${shiftList.cid} -${shiftList.fromDate?string("dd M yyyy")} </option>如果 shiftList.fromDate 日期