Foros de discusión
<aui:input> and null date
Marco Napolitano, modificado hace 11 años.
<aui:input> and null date
New Member Mensajes: 20 Fecha de incorporación: 14/02/12 Mensajes recientes
Hi all,
I'm using LR 6.1.1 CE and I have an entity with a Date field (called closedDate).
The field is not required and it's defined with this model hints:
The field is not required so it's almost always null. But if I render the value with this Alloy taglib (I'm correctly using the model-context tag)
the null value is not correctly rendered and the taglib always show now-date.
How can I show a null date?
I mean the 3 combo (day, month and year) must be preselected on empty value.
Tnx
Marco
I'm using LR 6.1.1 CE and I have an entity with a Date field (called closedDate).
The field is not required and it's defined with this model hints:
<hint-collection name="SEARCHABLE-DATE">
<hint name="month-nullable">true</hint>
<hint name="day-nullable">true</hint>
<hint name="year-nullable">true</hint>
<hint name="show-time">false</hint>
</hint-collection>
<field name="closedDate" type="Date">
<hint-collection name="SEARCHABLE-DATE" />
</field>
The field is not required so it's almost always null. But if I render the value with this Alloy taglib (I'm correctly using the model-context tag)
<aui:input name="closedDate" />
the null value is not correctly rendered and the taglib always show now-date.
How can I show a null date?
I mean the 3 combo (day, month and year) must be preselected on empty value.
Tnx
Marco
Brian Jamieson, modificado hace 11 años.
RE: <aui:input> and null date
Junior Member Mensajes: 51 Fecha de incorporación: 15/10/10 Mensajes recientes
Hi Marco,
I've hit the same problem in a couple of different places in my application too.
How Liferay deals with it in the web content schedule is like so:
Create the datefields, but also create a toggle function to disable the field - when the article is submitted, the disabled field values do not get passed through.
Look at liferay/src/Lportal611/portal-web/docroot/html/portlet/journal/article/schedule.jsp for more details.
Hope this helps, good luck.
Brian
I've hit the same problem in a couple of different places in my application too.
How Liferay deals with it in the web content schedule is like so:
Create the datefields, but also create a toggle function to disable the field - when the article is submitted, the disabled field values do not get passed through.
Look at liferay/src/Lportal611/portal-web/docroot/html/portlet/journal/article/schedule.jsp for more details.
Hope this helps, good luck.
Brian
Marco Napolitano, modificado hace 11 años.
RE: <aui:input> and null date
New Member Mensajes: 20 Fecha de incorporación: 14/02/12 Mensajes recientes
Yeah,
I always did with a checkbox but I'd like to know an alternative way to do that.
Tnx
Marco
I always did with a checkbox but I'd like to know an alternative way to do that.
Tnx
Marco