You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by ramlael <gr...@gmail.com> on 2011/07/06 14:16:23 UTC

Not closing the datepicker upon clicking outside

Hi, 

I have used the datepicker component in my application and it works great.
But currently when I click the icon attached with the datetextfield, it
opens up the datepicker, and if I click on a text box or anyother form
element outside the calendar, the popup remains opens still open and allows
the user to do operations on the background elements in the page.  I would
seriously like to solve this issue, by either using any functions already
available in the jar or by customizing it to a new class. Any pointers on
how to achieve this would be greatly appreciated.  My requirement would be
close the datepicker upon clicking outside it. 
Please help.

Thanks in advance.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Not-closing-the-datepicker-upon-clicking-outside-tp3648593p3648593.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: Not closing the datepicker upon clicking outside

Posted by Martin Grigorov <mg...@apache.org>.
Please, you do it and send us the related part.
We have our tasks and issues to solve. No time to do yours.

On Thu, Jul 7, 2011 at 1:25 PM, ramlael <gr...@gmail.com> wrote:
> Refer this URL for plain YUI :
> http://developer.yahoo.com/yui/examples/calendar/calcontainer.html
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Not-closing-the-datepicker-upon-clicking-outside-tp3648593p3651222.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: Not closing the datepicker upon clicking outside

Posted by ramlael <gr...@gmail.com>.
HI Andrea ,

Do you have any idea, how to do in Wicket?


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Not-closing-the-datepicker-upon-clicking-outside-tp3648593p3651340.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: Not closing the datepicker upon clicking outside

Posted by Andrea Del Bene <ad...@ciseonweb.it>.
I thought it was easier...anyway in the example I posted yesterday 
calendar is closed with a specific click handler:

// Hide Calendar if we click anywhere in the document other than the 
calendar
2    Event.on(document, "click", function(e) {
3
4        var el = Event.getTarget(e);
5        var dialogEl = dialog.element;
6
7        if (el != dialogEl && !Dom.isAncestor(dialogEl, el) && el != 
showBtn && !Dom.isAncestor(showBtn, el)) {
8            dialog.hide();
9        }
10    });

you should adapt this function selecting all elements with css class 
'yui-calcontainer' (ex: 
YAHOO.util.Dom.getElementsByClassName('yui-calcontainer' ); )  and hide 
them if they satisfy 'if' condition.
> Refer this URL for plain YUI :
> http://developer.yahoo.com/yui/examples/calendar/calcontainer.html
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Not-closing-the-datepicker-upon-clicking-outside-tp3648593p3651222.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
>
>
>


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


Re: Not closing the datepicker upon clicking outside

Posted by ramlael <gr...@gmail.com>.
Refer this URL for plain YUI :
http://developer.yahoo.com/yui/examples/calendar/calcontainer.html  

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Not-closing-the-datepicker-upon-clicking-outside-tp3648593p3651222.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: Not closing the datepicker upon clicking outside

Posted by ramlael <gr...@gmail.com>.
refer this site for plan YUI :
http://developer.yahoo.com/yui/examples/calendar/calcontainer.html  

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Not-closing-the-datepicker-upon-clicking-outside-tp3648593p3651221.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: Not closing the datepicker upon clicking outside

Posted by Martin Grigorov <mg...@apache.org>.
How would you do it with plain YUI ?

On Thu, Jul 7, 2011 at 11:19 AM, ramlael <gr...@gmail.com> wrote:
> Please suggest me on this...
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Not-closing-the-datepicker-upon-clicking-outside-tp3648593p3651028.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: Not closing the datepicker upon clicking outside

Posted by ramlael <gr...@gmail.com>.
Please suggest me on this... 

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Not-closing-the-datepicker-upon-clicking-outside-tp3648593p3651028.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: Not closing the datepicker upon clicking outside

Posted by ramlael <gr...@gmail.com>.
Hi,

Please can you help me, how to configure this in Wicket. I know how to
configure with exising YUI widgets, but there is no widget available for
"click". Do I need to create widget or is there any way to configure this.

Regards,
Rambabu 

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Not-closing-the-datepicker-upon-clicking-outside-tp3648593p3648968.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: Not closing the datepicker upon clicking outside

Posted by Andrea Del Bene <ad...@ciseonweb.it>.
Hi,
here http://developer.yahoo.com/yui/examples/calendar/calcontainer.html 
you can find an example of YUI calendar that closes when you click 
outside its area. You can see how it is configured and using this 
configuration in your DatePicker overriding configure() method.
> Hi,
>
> I have used the datepicker component in my application and it works great.
> But currently when I click the icon attached with the datetextfield, it
> opens up the datepicker, and if I click on a text box or anyother form
> element outside the calendar, the popup remains opens still open and allows
> the user to do operations on the background elements in the page.  I would
> seriously like to solve this issue, by either using any functions already
> available in the jar or by customizing it to a new class. Any pointers on
> how to achieve this would be greatly appreciated.  My requirement would be
> close the datepicker upon clicking outside it.
> Please help.
>
> Thanks in advance.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Not-closing-the-datepicker-upon-clicking-outside-tp3648593p3648593.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
>
>
>


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