my Problem: In my page, there's a p:calendar with the (required) option to manually enter a date value. If the user does, the flyout calendar correctly reflects the date, but the value is not yet set in the component. That only happens if you click the highlighted date with the mouse, click somewhere else on the page or tab out of the input box.
Now, in this page, the calendar happens to be the last element, so people tend to just enter the date and then click the "Send" button without leaving the calendar input box first.
Obviously, now the "Send" button "wins the race against" the calendar setting its value, so the old value (null resp. the initial value) is sent to the Bean instead of the entered date.
Can anyone help? Is there a workaround?
I already added this to my "Send" button to simulate a click on the body, which helps in ~ 3/4 of the tests, but that's not secure enough for a production environment.
Code: Select all
onclick="document.getElementsByTagName('BODY')[0].click();"
Help would be greatly appreciated.
Best regards,
Ralf