Hi,

I bumped into the slightly changed datapickers since HPD and i have read
the 'HPD dates' forum post.

The solution presented there does not work for me as we use different
localizations. I therefore reverted back to the old way of working. On
start of the workflow (onload event) I run the following code to set the
start date to today.


Code:
--------------------

var d = form.dateToString(new Date(), false);
form.setValues("startDate", d);

--------------------


This works perfectly fine for localized browsers. However: with this
start date I need to calculate the end date (which must be 180 days
after the start date) and that's where the workflow breaks. It does not
seem to be possible to *set* another datepicker from the datepicker
onchange event. The error 'TypeError: this.jqPicker is undefined' is
displayed, but strangely on the start date datepicker and not on the
picker you try to set.

The strange thing is, if I try to set the initials field in the onchange
event, this works fine.


Code:
--------------------

startdate onchange:
form.setValues("initials", "Test")

--------------------


But if i try to set the end date to today in an onchange event on the
start date field, it fails with the 'jqPicker is undefined' error on the
*start date* datepicker.


Code:
--------------------

startdate onchange:
var d = form.dateToString(new Date(), false);
form.setValues("endDate", d);

--------------------


Am I missing something ?


--
Sjoerdk
------------------------------------------------------------------------
Sjoerdk's Profile: https://forums.netiq.com/member.php?userid=1135
View this thread: https://forums.netiq.com/showthread.php?t=55081