Basavaraj
Basavaraj

Reputation: 1111

Date Format (dd M yyyy) in Spring Freemarker(.ftl)

I have a dropdown and i need to display cid-date(in dd M yyyy) format in spring freemarker(.ftl file). My dropdown code...

        <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>

Can any one please suggest me how to display Date in dd M yyyy this format. I am using also using Jquery,if any idea to using jquery to make date format change in .ftl file.

please Suggest me.

thanks.

Upvotes: 0

Views: 489

Answers (1)

manish
manish

Reputation: 20135

<option value="${shiftList.cid}">${shiftList.cid} -${shiftList.fromDate?string("dd M yyyy")} </option> if shiftList.fromDate is a Date.

Upvotes: 1

Related Questions