Xpages Date Picker 'onChange' & partial refresh problem

I have edit box on my XPage with Date Picker helper. That works fine.

I have a Computed Field which builds a set of calendars using javascript to create html by using the date from the ‘datePicker’ edit box (via “getComponent(“datePicker”).getValue()”) to dblookup mailboxes. That works fine.

The onChange event of the date picker is set to partial refresh the computed field. That works, sort of. When I change the date nothing happens. Then if I change it again, the calendar refreshes with the previous value of the date picker. I know the onChange is executing right away because I’ve put code in there (“window.alert(‘Boo!’)”) that executes as soon as I change the date. But the computed field always lags one behind what the date picker is doing.

How can I get the computed field to recalculate using the value I just set instead of the last one?

Many thanks to anyone who can help.

Subject: SPR logged

Hi

This is an issue and I have logged an SPR against it LHEY7XFJ42

Kind Regards

Lisa Henry

Subject: xpages date picker refresh

I am also experiencing this issue. i carry out a full refresh on change an the date field is blanked out,if i do a parial refresh on itself t alos blanks out. If you perform a partial refresh on something else teh previous date is submitted.

Subject: Any solution?

Same problem. There are any solution?

This issue will be solved on Domino 8.5.2?

Subject: Is there a workround?

Yes apparently the issue is solved in 8.5.2. Unfortunately, my app is deployed to a 8.5.1 server but I’m working on an 8.5.2 server in dev. Ugh! I need a workaround for production…

Subject: Looking into this xp:eom/

Subject: Thanks

One thing I did notice. When I put “window.alert(‘Boo!’)” in the client side JavaScript for the onChange event, it worked ok. That is it puts up the ‘Boo!’ prompt, then refreshes. I’m guessing it’s the ‘Asynchronous’ bit of ‘AJAX’ that’s foxing me. i.e. the computed field is refreshing before the date picker, but sticking a prompt in gives the date picker time to update first.

Subject: It’s easy to repoduce

I created a test page with just a date picker and a computed field with this javascript in its value property:-

getComponent(“datePicker”).getValue

Then in the onChange of the date picker, set it to partial refresh the computed field.

Same thing; field updates when you change the date, but displays the last selection of the date picker, not the new one.