You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Vishal Popat <vi...@cipriati.co.uk> on 2012/05/10 11:43:02 UTC

Two YUI DatePickers - use first date as basis for second date

Hi,

I have two YUI DatePickers where the date selected from the first DatePicker is the starting date (+1) for the second DatePicker.
I would ideally like to disable the dates prior to the first date as well.
The scenario is like checkin and checkout dates for hotels.

I cannot work out how to hook into the YUI javascript after the page has already loaded- assuming that is the best way to solve the problem.

Any help would be appreciated.

Regards
Vishal
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Two YUI DatePickers - use first date as basis for second date

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Wicket just wraps the JS component. I.e. you can set your settings in
Java and Wicket will serialize them to JSON which YUI Calendar will
use to configure itself.
But if you can set the needed property in pure JavaScript then it will
be faster because there wont be an Ajax roundtrip to the server.
See http://developer.yahoo.com/yui/calendar/ and search for 'mindate' setting

On Fri, May 11, 2012 at 3:34 PM, vp143 <vi...@cipriati.co.uk> wrote:
> Thanks for your answer.
> I was hoping that there might something in Wicket.
>
> I did look at the YUI docs but so far cant find exactly what I need to do.
> It seems like I need to add a listener which calls a JS method which I think
> I have understood but cant work out what is required to change the minimum
> date.
>
> Regards
> Vishal
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Two-YUI-DatePickers-use-first-date-as-basis-for-second-date-tp4623018p4626281.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Two YUI DatePickers - use first date as basis for second date

Posted by vp143 <vi...@cipriati.co.uk>.
Thanks for your answer.
I was hoping that there might something in Wicket.

I did look at the YUI docs but so far cant find exactly what I need to do.
It seems like I need to add a listener which calls a JS method which I think
I have understood but cant work out what is required to change the minimum
date.

Regards
Vishal


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Two-YUI-DatePickers-use-first-date-as-basis-for-second-date-tp4623018p4626281.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Two YUI DatePickers - use first date as basis for second date

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

You can update the second DatePicker with Ajax or just clientside
after the user makes a selection on the first.
Check YUI docs to see what exactly you need to do.

On Thu, May 10, 2012 at 12:43 PM, Vishal Popat
<vi...@cipriati.co.uk> wrote:
> Hi,
>
> I have two YUI DatePickers where the date selected from the first DatePicker is the starting date (+1) for the second DatePicker.
> I would ideally like to disable the dates prior to the first date as well.
> The scenario is like checkin and checkout dates for hotels.
>
> I cannot work out how to hook into the YUI javascript after the page has already loaded- assuming that is the best way to solve the problem.
>
> Any help would be appreciated.
>
> Regards
> Vishal
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org