[richfaces-issues] [JBoss JIRA] (RF-12594) rich:calendar defaultLabel causes conversion error if not populated.

Lukáš Fryč (JIRA) jira-events at lists.jboss.org
Mon Dec 17 02:42:08 EST 2012


     [ https://issues.jboss.org/browse/RF-12594?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukáš Fryč updated RF-12594:
----------------------------

    Workaround Description: 
*Workaround #1:*

Use Placeholder component from RF 4.3

*Workaround #2:*

This can be handled by custom JavaScript to clear value before submission.

On a4j:commandButton add {code}onclick="clearEmptyDate();"{code}

Then clear the date if it still matches defaultLabel.  Example using JQuery:
{code}
<h:outputScript>
    function clearEmptyDate() {
        if('MMDDYYYY' == jQuery("#searchParticipant\\:dobInputDate").val()) {
            jQuery("#searchParticipant\\:dobInputDate").val('');
        }
    }
</h:outputScript>
{code}

  was:
This can be handled by custom JavaScript to clear value before submission.

On a4j:commandButton add {code}onclick="clearEmptyDate();"{code}

Then clear the date if it still matches defaultLabel.  Example using JQuery:
{code}
<h:outputScript>
    function clearEmptyDate() {
        if('MMDDYYYY' == jQuery("#searchParticipant\\:dobInputDate").val()) {
            jQuery("#searchParticipant\\:dobInputDate").val('');
        }
    }
</h:outputScript>
{code}


    
> rich:calendar defaultLabel causes conversion error if not populated.
> --------------------------------------------------------------------
>
>                 Key: RF-12594
>                 URL: https://issues.jboss.org/browse/RF-12594
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-input
>    Affects Versions: 4.2.2.Final, 4.2.3.Final, 4.3.0.M2
>            Reporter: Justin Rosenberg
>            Assignee: Lukáš Fryč
>
> If the defaultLabel attribute is set for a rich:calendar object and no value is entered, a conversion error occurs.  It seems like the submission is trying to parse the defaultLabel value into a date.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the richfaces-issues mailing list