Hy all
I am new to Liferay and I am porting from jsp to the Liferay portal.
If I have a jsp portlet with two dates in it, for example: From the date Meet and use two different values โโof liferay-ui: input-date one for each date field, for example:
...
<%-- From DATE --%>
<tr>
<td>
From date :
</td>
<td>
<liferay-ui:input-date
dayParam='<%= "strDataRegDa" + "Day" %>'
dayValue="<%=Integer.parseInt(strDataRegDa.substring(0,2))%>"
dayNullable="<%= false %>"
monthParam='<%= "strDataRegDa" + "Month" %>'
monthValue="<%=(Integer.parseInt(strDataRegDa.substring(3,5))) -1 %>"
monthNullable="<%= false %>"
yearParam='<%= "strDataRegDa" + "Year" %>'
yearValue="<%=Integer.parseInt(strDataRegDa.substring(6))%>"
yearNullable="<%= false %>"
yearRangeStart="<%= 1980 %>"
yearRangeEnd="<%= 2050 %>"
firstDayOfWeek="<%= Calendar.MONDAY - 1 %>"
imageInputId='<%= "ceremonyDate"%>'
disabled="false" >
</liferay-ui:input-date>
</td>
</tr>
<%-- To DATE --%>
<tr>
<td>
To date :
</td>
<td>
<liferay-ui:input-date
dayParam='<%= "strDataRegA" + "Day" %>'
dayValue="<%=Integer.parseInt(strDataRegA.substring(0,2))%>"
dayNullable="<%= false %>"
monthParam='<%= "strDataRegDa" + "Month" %>'
monthValue="<%=(Integer.parseInt(strDataRegA.substring(3,5))) -1 %>"
monthNullable="<%= false %>"
yearParam='<%= "strDataRegDa" + "Year" %>'
yearValue="<%=Integer.parseInt(strDataRegA.substring(6))%>"
yearNullable="<%= false %>"
yearRangeStart="<%= 1980 %>"
yearRangeEnd="<%= 2050 %>"
firstDayOfWeek="<%= Calendar.MONDAY - 1 %>"
imageInputId='<%= "ceremonyDate"%>'
disabled="false" >
</liferay-ui:input-date>
</td>
</tr>
....
Is there a way to control that ToDare is> = FromDate?
With pure jsp, I can do this through javascript.
But with Liferay, how can this be achieved?
source
share