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.

Reply via email to