This content has been marked as final.
Show 2 replies
-
1. Re: rich:calendar oninputchange event problem
ilya_shaikovsky Feb 15, 2010 10:10 AM (in response to 71marzano)Very interesting case,. As I gues the goal of your selectDate() statement - to set the date in calendar js object in order to changed event to be risen and your ajax request to be called.
The problem is - selectDate function designed to set some new date from js. So after all the parsing and setting in client objects - it tries to update input itself. But the input already contains the same date And it works for the 2/x/x dates only because pased date which will be setted is 02/x/x and input date 2/x/x - so condition for changed is true and event risen
I suggest you to change the code to this:
<rich:calendar id="test" datePattern="dd/MM/yyyy" enableManualInput="true" oninputchange="if (validate) {ajaxSubmit()}"> <a4j:support event="onchanged" oncomplete="alert('completed')"/> </rich:calendar> <a4j:jsFunction name="ajaxSubmit">
-
2. Re: rich:calendar oninputchange event problem
71marzano Feb 16, 2010 8:23 PM (in response to ilya_shaikovsky)Thanks for the reply, I ended up using a <h:inputText> for the manual input which I validate and hidding the input field in the rich:calendar.