This content has been marked as final.
Show 2 replies
-
1. Re: Richfaces 4.2 Calendar How to write a date string to the imput field by JavaScript?
sanyika Apr 18, 2013 6:08 AM (in response to sanyika)In the meantime we found the solution:
RichFaces Calendar generates a different ID for the InputField. It is not the same as the ID defined for the Calendar component in JSF code.
JavaScript needs to use this new internal id to access the input field.You can find the id if you inspect the HTML code using i.e. Firebug.
-
2. Re: Richfaces 4.2 Calendar How to write a date string to the imput field by JavaScript?
michpetrov Apr 18, 2013 7:25 AM (in response to sanyika)1 of 1 people found this helpfulWhile your solution may work you might want to know about the functionality provided by RichFaces:
<button onclick="#{rich:component('calendar')}.setValue(date)" />
rich:component('calendar') finds a <rich:calendar> with id="calendar", and setValue() sets its value, surprisingly. Many RichFaces components have JavaScript methods available to them.