Hi,
first you need to get the js reference to the calendar control...
The js variable to use is named like calendar_XXX where XXX
is the id of your DatePicker control.
After you know that, you can do:
calendar_XXX.setSelectedDate('15 Mar 2008')
On Thu, Mar 20, 2008 at 1:21 PM, Andy Pahne [EMAIL PROTECTED] wrote:
I wonder how to set the date of a DatePicker in Javascript.
I tried sth. like
document.forms[0].departureDatePicker.value='x.x.x'
which works partly. The text field is updated, but when I click on the
DatePicker icon the picker is still set to the old value.
I had a look at DatePicker.js and found the funtion
Calendar.prototype.setCurrentDate = function(date) {
...
}
That one seems to be a good candidate for my task, but I don't have any
idea, how to invoke it. (My knowledge about JavaScript is almost non
existant).
Andy
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]