struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <>
Subject Re: set value of the datetimepicker but the value does not appear in the input box
Date Wed, 20 Sep 2000 02:41:40 GMT
Date date = new Date("Sat, 01 Jan 2007 13:30:00 GMT");

and then once you acquire the id call setDate as in

courtesy of a posting by musachy


----- Original Message ----- 
From: "Andvar Woo" <>
To: <>
Sent: Wednesday, September 19, 2007 10:13 PM
Subject: set value of the datetimepicker but the value does not appear in 
the input box

> hi all,
>     i want to set the value of a datetimepicker in javasript but encounter
> a problem. i do that like this: first use ajax to
> get a record as a "json" object,then use the "json" object to initialize a
> form, which contains a datetimepicker.
> the form is used to add a new record and to modify a select record.
> the main code is as follows
> //the datetimepicker i want to set value,the  <s:head theme="ajax"/> is
> included in the head tags.
> <s:datetimepicker id="validateDate" label="Validate Date"
>      name="blacklist.validateDate" displayFormat="yyyy-MM-dd" />
> //the js to set value of datetimepicker
>  function modify()
> {
>     var vDate = dojo.widget.byId("validateDate");
>      vDate.setValue('2007-01-01');
>      alert(vDate.getValue());
> }
> the value do be set because the 'alert(vDate.getValue())'  shows the value
> '2007-01-01',the problem is the input box of the datetimepicker displays
> nothing,and i couldnot select a new date either,something like the
> datetimepicker is disabled,(<s:head theme="ajax"/> is included in the head
> tags,the datetimepicker works well when add a record in the form)
> does anyone knows how to handle this problem?
> many thanks.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message