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}'/>" />
Try this:
<fmt:formatDate pattern="dd/MM/yyyy" value="${editableUser.DOB}" var="myDateVar"/>
<form:input path="DOB" value="${myDateVar}"/>
Tested and Working.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With