Hi,

We have also been using the calendar from 
http://www.dynarch.com/projects/calendar/
The way we set-up the calendar was:

Include the calandar js file and setup javascript in the html head  
element.

        <script type="text/javascript" src="$ 
{pageContext.request.contextPath}/script/calendar.js"></script>
        <script type="text/javascript">
        function setupCalendar(id) {
          Calendar.setup({
            inputField     :    id,
            ifFormat       :    "%d/%m/%Y",
            daFormat       :    "%d/%m/%Y",
            showsTime      :    false,
            button         :    id+"_trigger",
            singleClick    :    true
          });
        }
        </script>

We then have a partial page called _calendar.jsp

        <[EMAIL PROTECTED] language="Java" contentType="text/html; 
charset=UTF-8" %>
        <[EMAIL PROTECTED] file="/pages/_taglibs.jsp" %>
        
        <stripes:layout-definition>
            <stripes:text name="${beanName}" id="${beanName}"  
formatType="date" formatPattern="dd/MM/yyyy" />
            <img src="${pageContext.request.contextPath}/images/calendar.gif"  
id="${beanName}_trigger" class="calendar">
            <stripes:errors field="${beanName}" />
            <script type="text/javascript">setupCalendar("${beanName}");</ 
script>
        </stripes:layout-definition>

When we want to use a calendar we just include the partial page in the  
html

        Date of Birth: <stripes:layout-render name="/pages/_calendar.jsp"  
beanName ="person.dob"  />

We are currently still using Stripes 1.4 so I hope this still works  
when we migrate to 1.5. Please let me know if anyone has done this an  
easier way.

Regards
Philz

I have also include this on our technical home page 
http://www.shiftyjelly.com/index.php/Stripes#Tips

On 04/06/2008, at 3:14 PM, Will Hartung wrote:

On a similar note, once you have it set up once, it's trivial to
create a tagfile "date" tag to do all of this for you in the future.

Regards,

Will Hartung

On Jun 3, 2008, at 6:40 AM, Chris Herron wrote:

> Christophe,
>
> Stripes does not provide these kinds of UI components, but it will
> work fine alongside other libraries. For example, you can use
> something like this: http://www.dynarch.com/projects/calendar/
> ... and configure it to insert the chosen date value into a
> stripes:text input within a stripes:form. Have that field point to a
> Date property on an action bean, and Stripes will convert and bind the
> calendar-entered value for you.
>
> Chris.
>
> On Jun 3, 2008, at 3:14 AM, cfoiret wrote:
>
>> Hi,
>>
>> Is it possible to display a DHTML Calendar to input a date field ?
>> If yes, what is the syntax ?
>>
>> Thanks
>>
>>
>>
>> ---------------------------------------------------------------------
>> ----
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Stripes-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
> ----------------------------------------------------------------------
> ---
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to