<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>How to add calendar for a form input field?</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=2061389" />
  <subtitle>How to add calendar for a form input field?</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=2061389</id>
  <updated>2026-04-10T13:36:58Z</updated>
  <dc:date>2026-04-10T13:36:58Z</dc:date>
  <entry>
    <title>RE: How to add calendar for a form input field?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=11385688" />
    <author>
      <name>Alberto Gonzalez</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=11385688</id>
    <updated>2011-11-08T13:33:46Z</updated>
    <published>2011-11-08T13:33:46Z</published>
    <summary type="html">&lt;div class="quote-title"&gt;Jakub Liska:&lt;/div&gt;&lt;blockquote&gt;Hi Tanweer,&lt;br /&gt;&lt;br /&gt;well if you use aui:input, then the tag library recognizes (based on model-hints) what data type the field is of - Date. So that it uses liferay-ui:input-date/time under the hood. With these two tags it is obvious, you declare params of year, month, day etc., and you know what parameters in request holds the particular values of year, month, day etc. as integer values. But as I was using aui:input tag for this I thought that it populates field (Date) of bean/command object with Date value...&lt;br /&gt;&lt;br /&gt;Take a look at this &lt;a href="http://www.liferay.com/community/forums/-/message_boards/message/6441611"&gt;thread&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Instead of getting the individual integer values, which is stupid (as the only possibility), it would be much better if it returned MDY string and programmer could use variety of classes for converting it into Date type. With Spring MVC, you wouldn&amp;#39;t have to write anything except of one line registering editor that does this conversion.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;How can i do this? I work with liferay 6 and spring MVC, but i can´t associate a form file with the liferay-ui:input-date</summary>
    <dc:creator>Alberto Gonzalez</dc:creator>
    <dc:date>2011-11-08T13:33:46Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to add calendar for a form input field?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=6461792" />
    <author>
      <name>Tanweer Ahmed .</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=6461792</id>
    <updated>2022-06-11T18:01:40Z</updated>
    <published>2010-11-16T15:46:23Z</published>
    <summary type="html">Thnx Jakub, for your knowledge sharing.A gr8 learning....&lt;img alt="emoticon" src="@theme_images_path@/emoticons/closed_eyes.gif" &gt;</summary>
    <dc:creator>Tanweer Ahmed .</dc:creator>
    <dc:date>2010-11-16T15:46:23Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to add calendar for a form input field?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=6453776" />
    <author>
      <name>Jakub Liska</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=6453776</id>
    <updated>2010-11-15T23:48:21Z</updated>
    <published>2010-11-15T23:48:21Z</published>
    <summary type="html">Hi Tanweer,&lt;br /&gt;&lt;br /&gt;well if you use aui:input, then the tag library recognizes (based on model-hints) what data type the field is of - Date. So that it uses liferay-ui:input-date/time under the hood. With these two tags it is obvious, you declare params of year, month, day etc., and you know what parameters in request holds the particular values of year, month, day etc. as integer values. But as I was using aui:input tag for this I thought that it populates field (Date) of bean/command object with Date value...&lt;br /&gt;&lt;br /&gt;Take a look at this &lt;a href="http://www.liferay.com/community/forums/-/message_boards/message/6441611"&gt;thread&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Instead of getting the individual integer values, which is stupid (as the only possibility), it would be much better if it returned MDY string and programmer could use variety of classes for converting it into Date type. With Spring MVC, you wouldn&amp;#39;t have to write anything except of one line registering editor that does this conversion.</summary>
    <dc:creator>Jakub Liska</dc:creator>
    <dc:date>2010-11-15T23:48:21Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to add calendar for a form input field?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=6451501" />
    <author>
      <name>Tanweer Ahmed .</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=6451501</id>
    <updated>2022-06-11T18:01:40Z</updated>
    <published>2010-11-15T18:33:04Z</published>
    <summary type="html">&lt;div class="quote-title"&gt;Jakub Liska:&lt;/div&gt;&lt;blockquote&gt;Sorry for my confusion, I was using aui:input tag without trying liferay-ui:input-date/time first...now it&amp;#39;s everything clear to me&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Hi Jakub,&lt;br /&gt;&lt;br /&gt;Could u plz share ur learnings.</summary>
    <dc:creator>Tanweer Ahmed .</dc:creator>
    <dc:date>2010-11-15T18:33:04Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to add calendar for a form input field?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=6441628" />
    <author>
      <name>Jakub Liska</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=6441628</id>
    <updated>2010-11-15T00:02:42Z</updated>
    <published>2010-11-15T00:02:42Z</published>
    <summary type="html">Sorry for my confusion, I was using aui:input tag without trying liferay-ui:input-date/time first...now it&amp;#39;s everything clear to me</summary>
    <dc:creator>Jakub Liska</dc:creator>
    <dc:date>2010-11-15T00:02:42Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to add calendar for a form input field?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=6438600" />
    <author>
      <name>Jakub Liska</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=6438600</id>
    <updated>2010-11-14T01:19:46Z</updated>
    <published>2010-11-14T01:19:46Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;I suppose that the only way how to get DATE type of data out of forms is this one:&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;		
int birthdayMonth = ParamUtil.getInteger(actionRequest, "birthdayMonth");
int birthdayDay = ParamUtil.getInteger(actionRequest, "birthdayDay");
int birthdayYear = ParamUtil.getInteger(actionRequest, "birthdayYear");
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;
&amp;lt;aui:input name="birthdayMonth" type="hidden" value="&amp;lt;%= Calendar.JANUARY %&amp;gt;" /&amp;gt;
&amp;lt;aui:input name="birthdayDay" type="hidden" value="1" /&amp;gt;
&amp;lt;aui:input name="birthdayYear" type="hidden" value="1970" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;Cause all the other tags looks like they could do it, but as I was looking into the source code ... this seems as the only way...&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Jakub Liska</dc:creator>
    <dc:date>2010-11-14T01:19:46Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to add calendar for a form input field?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=6438560" />
    <author>
      <name>Jakub Liska</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=6438560</id>
    <updated>2010-11-14T00:38:44Z</updated>
    <published>2010-11-14T00:38:44Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi guys,&lt;br&gt;&lt;br&gt;I can't populate the form backing bean with the Date value from these Date input fields. The field of bean that corresponds to the form field is of type Date, so that for example:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;aui:input label="Time Frame" name="timeFrame" /&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;taglib finds out the field has type "Date" so that it renders the Date widget with calendar, but the form backing bean never gets populated after submit. As well as here :&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;liferay-ui:input-field model="&amp;lt;%= CalEvent.class %&amp;gt;" field="timeFrame" /&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;How can I populate a form backing object (declared in aui:model-context) with Date value from these calendars ?&lt;br&gt;&lt;br&gt;&lt;br&gt;Also I can't figure out what is the proper use of this one:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;liferay-ui:input-date yearrangeend="" yearrangestart="" formname=""&amp;gt;&amp;lt;/liferay-ui:input-date&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;It's just a widget that puts its values into request like this:&lt;br&gt;  &lt;pre&gt;&lt;code&gt;{ liferay-ui:input-date:dayValue, value }&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;to render into particular time setting, but I can't see anything else I can do with it :-)&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Jakub Liska</dc:creator>
    <dc:date>2010-11-14T00:38:44Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to add calendar for a form input field?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=4092775" />
    <author>
      <name>Juan Fernández</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=4092775</id>
    <updated>2009-10-05T07:39:02Z</updated>
    <published>2009-10-05T07:39:02Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi!:&lt;br&gt;You can add it using this:&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;liferay-ui:input-field model="&amp;lt;%= CalEvent.class %&amp;gt;" field="startDate" /&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;You can do some research in its related files: InputFieldTag.java, liferay-ui.tld and page.jsp&lt;br&gt;Greetings &lt;br&gt;Juan Fernández&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Juan Fernández</dc:creator>
    <dc:date>2009-10-05T07:39:02Z</dc:date>
  </entry>
  <entry>
    <title>How to add calendar for a form input field?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=2061388" />
    <author>
      <name>Vivek N Kapse</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=2061388</id>
    <updated>2009-01-29T22:11:33Z</updated>
    <published>2009-01-29T22:11:33Z</published>
    <summary type="html">Hi,&lt;br /&gt;&lt;br /&gt;How do I add calendar for a form input field in struts portlet. I am using Crystalx-theme, is there a tld file and javascript file for calendar that can be just used to add Calendar option for a form input field?&lt;br /&gt;Also where do i edit if i want the format of the date to be in yyyy-mm-dd? Also instead of  drop down for the months and the year range I need just a plain text field with calendar option which would take dates in yyyy-mm-dd format.</summary>
    <dc:creator>Vivek N Kapse</dc:creator>
    <dc:date>2009-01-29T22:11:33Z</dc:date>
  </entry>
</feed>
