Hi, my PRD's form contains a DatePicker. I want to perform some actions
with the date before submitting the value. I do not understand how to
get a date object starting from the value returned from the JUICE
Control. At the moment I have tried the following ways:


form.interceptAction("SubmitAction", "around",
function (invocation) {
var ctrl = JUICE.UICtrlUtil.getControl('startDate');
var sCtrlDate = JUICE.UICtrlUtil.getEle(ctrl);

var sValueDate = sCtrlDate.value;
alert("Field: " + sValueDate);
alert("Time: " + form.stringToDate(sValueDate,true));

var sMilliseconds= Date.parse(sValueDate);
alert("Date read! ");
var sDate= new Date( sMilliseconds);
alert("Date:" + sDate.toUTCString());
var result = invocation.proceed(); return result;



My locale is italian and I have chosen the date "Thu, 08 Dec 2011". I'm
receiving the following messages:

Field: 08/12/2011
Time: Thu Jan 01 1970 01:00:00 GMT+0100
Date read!
Date:Thu, 11 Aug 2011 22:00:00 GMT

Which is the correct way for getting a date object? Any suggestion will
be appreciated.
Best regards,


afolli's Profile: http://forums.novell.com/member.php?userid=6964
View this thread: http://forums.novell.com/showthread.php?t=449110