You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andreas Andreou <an...@gmail.com> on 2008/03/28 20:42:04 UTC
Re: [T4.1] Setting the value of a DatePicker clientside
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 <ap...@net22.de> 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org