Issue
I have a problem in my app. I have a form in which I'm editing some fields from databases. And 'time' field is always 'not in line' with the rest. Problem is with 'form:input path="time"' mark. When I change 'time' to 'date' or 'description' everything is nice. Here is image how it looks like:
And here is part of my jsp file:
<form:form method="post" commandName="note" action="update_note">
<form:hidden path="note_id"/>
<div id="vertical">
<div id="edit">
Date
<form:input path="date"/>
</div>
<div id="edit">
Time
<form:input path="time"/>
</div>
<div id="edit">
Description
<form:input size="30" path="description"/>
</div>
</div>
</div>
Time in database is TIME type and in java class I'am mapping it to java.sql.Time object. Any ideas what can be wrong with this 'time' in input path?
Solution
Put the size
attribute on input field time
and date
<form:input size="20" path="date"/>
<form:input size="20" path="time"/>
Answered By - Roman C