5

I am assigning the formatted date to an <form:input> tag but instead of the formatted date, the jstl code is allocated to the textfield.

<form:input path="DOB" value="<fmt:formatDate pattern='dd/MM/yyyy' value='${editableUser.DOB}'/>" />
venki
  • 1,121
  • 1
  • 9
  • 18
h-rai
  • 3,636
  • 6
  • 52
  • 76

1 Answers1

6

Try this:

<fmt:formatDate pattern="dd/MM/yyyy" value="${editableUser.DOB}" var="myDateVar"/>
<form:input path="DOB" value="${myDateVar}"/>

Tested and Working.

venki
  • 1,121
  • 1
  • 9
  • 18