You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by sandeepraj singh <sa...@atosorigin.com> on 2009/11/19 10:40:43 UTC

Date Field Component - Disable

Hi, 
A weird requirement may be,

I want to use Date Field Component and the ability to disable the text field
associated with it only. The intention is to match the existing date
component in one of older technologies we worked on. While migrating to
Tapestry5 we want that by clicking the Calender icon a date is selected but
after that no one should be allowed to tinker with it and hence we want to
disable the text box associated with it.

Do you think that for such a requirement, creating my own component is a
better bet?

Thanks
Sandeep
-- 
View this message in context: http://old.nabble.com/Date-Field-Component---Disable-tp26421251p26421251.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: Date Field Component - Disable

Posted by Sven Homburg <ho...@googlemail.com>.
try this component:
http://www.chenillekit.org/demo/tapcomp/datetimefielddemo
http://www.chenillekit.org/chenillekit-tapestry/ref/org/chenillekit/tapestry/core/components/DateTimeField.html

with regards
Sven Homburg
Founder of the Chenille Kit Project
http://chenillekit.codehaus.org




2009/11/19 sandeepraj singh <sa...@atosorigin.com>

>
> Hi,
> A weird requirement may be,
>
> I want to use Date Field Component and the ability to disable the text
> field
> associated with it only. The intention is to match the existing date
> component in one of older technologies we worked on. While migrating to
> Tapestry5 we want that by clicking the Calender icon a date is selected but
> after that no one should be allowed to tinker with it and hence we want to
> disable the text box associated with it.
>
> Do you think that for such a requirement, creating my own component is a
> better bet?
>
> Thanks
> Sandeep
> --
> View this message in context:
> http://old.nabble.com/Date-Field-Component---Disable-tp26421251p26421251.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Date Field Component - Disable

Posted by sandeep learning tapestry <sa...@atosorigin.com>.
Thanks for your reply.
We have finally decided to have our ownDatefield component.

Temporarily we do with changes with javascript as u suggested

regards,
sandeep

-----
Thanks,
Sandeep
"Learning Tapestry"
-- 
View this message in context: http://n2.nabble.com/Date-Field-Component-Disable-tp4030939p4685186.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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


Re: Date Field Component - Disable

Posted by Bård Magnus Kvalheim <ma...@kvalheim.eu>.
A simple solution with javascript.

So if having the component:
<t:datefield t:id="date"/>

you could make it readonly

 <script type="text/javascript">
        $('date').readOnly=true;
 </script>

---- With tapx ---

The standard datefield component don't seem to work when disabled, but the
tapx one does (FF 3.5 & Opera 10).

namespace
(xmlns:x="tapestry-library:tapx")

<x:datefield t:id="date"/>

you could make it disabled

 <script type="text/javascript">
        $('date').disabled=true;
 </script>

Regards
Magnus

2009/11/19 sandeepraj singh <sa...@atosorigin.com>

>
> Hi,
> A weird requirement may be,
>
> I want to use Date Field Component and the ability to disable the text
> field
> associated with it only. The intention is to match the existing date
> component in one of older technologies we worked on. While migrating to
> Tapestry5 we want that by clicking the Calender icon a date is selected but
> after that no one should be allowed to tinker with it and hence we want to
> disable the text box associated with it.
>
> Do you think that for such a requirement, creating my own component is a
> better bet?
>
> Thanks
> Sandeep
> --
> View this message in context:
> http://old.nabble.com/Date-Field-Component---Disable-tp26421251p26421251.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>