How to disable past dates with liferay-ui:input-dateHow to disable past dates with liferay-ui:input-datehttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1213987272024-03-29T01:33:43Z2024-03-29T01:33:43ZRE: How to disable past dates with liferay-ui:input-dateGennaro Lippiellohttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1213994822022-04-13T14:32:37Z2022-04-13T14:23:59Z<p>Hi, have you tried the <strong>firstEnabledDate </strong>attribute?
Just add </p>
<pre>
<code class="language-java">firstEnabledDate="<%=new Date()%>"</code></pre>
<p>Take a look here <a href="https://docs.liferay.com/portal/7.0/taglibs/util-taglib/liferay-ui/input-date.html">liferay-ui/input-date</a></p>Gennaro Lippiello2022-04-13T14:23:59ZRE: How to disable past dates with liferay-ui:input-dateCarlos Duránhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1213994022022-04-13T15:26:06Z2022-04-13T13:22:01Z<p>You can use the firstEnabledDate parameter like this:</p>
<pre>
<code class="language-java"><liferay-ui:input-date firstEnabledDate="<%= new Date() %>" /></code></pre>
<p>
<img alt="" src="/documents/14/0/9qAe4vTdKc.png/29b8aebd-9891-aea9-848c-8cf027541d97?t=1649856050310&imagePreview=1" /></p>
<p>Hope it helps.</p>Carlos Durán2022-04-13T13:22:01ZHow to disable past dates with liferay-ui:input-dateMaría Zhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1213987262022-04-12T16:46:23Z2022-04-12T10:10:05Z<p>Hey, everyone!</p>
<p>I was trying to disable in the calendar and in
the liferay-ui:input-date the value of a past date (allow just the
dates after now), but I haven't found a solution on the Internet.
Could anyone help me?</p>
<p>My code is here (JSP):</p>
<pre>
<code class="language-java"><liferay-ui:input-date
name="fechaPubl" yearValue="<%=nowDate.get(nowDate.YEAR)%>"
monthValue="<%=nowDate.get(nowDate.MONTH)%>"
dayValue="<%=nowDate.get(nowDate.DAY_OF_MONTH)%>" dayParam="dateFrom-day"
monthParam="dateFrom-month" yearParam