Hi, I am trying to reset the value of a datetimepicker in a jsp page using
struts2 (2.0.6).

I can not reset the value.

See code below.
The onchange and the call to the Java script function (planStatuschanged )
seems to work, but the datetimepicker's value is not set to "". If I use an
ordinary input tag (<input ...) instead of a datetimepicker it works.

I have tried the dojo.widget.byId("statusDateId").setDate("") method instead
of :
formObj.statusDateId.value="";

But that do not work either.
What am I doing wrong ? 




<s:select onchange="planStatuschanged(document.formular)" ...
...
...
id="planStatus"/>

<s:datetimepicker id="statusDateId" name="statusDate" 
label="Planeringsdatum"/>
                

function planStatuschanged (formObj) {
 if (formObj.planStatus.options[formObj.planStatus.selectedIndex].value ==
4) {
 formObj.statusDateId.value="";
  }
 
}
-- 
View this message in context: 
http://www.nabble.com/reset-the-value-of-a-datetimepicker-using-java-script-tf3680879.html#a10286861
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to