Here I have tried both using both the bind and onchange techniques.

using the onchange event directly doesn't seem to do anything, maybe my js is 
bad

unfortunately the bind mixin as with zoneUpdater doesn't catch the change event 
when it's fired by the date pickerm as with the zoneUpdater it only works when 
you focus the input field change it and remove the focus?

John


        <form t:type="form" t:id="registerForm">
        <t:jquery.jgrowl />
        <t:errors />
        <center t:type="if" t:test="authenticated">
            <h2>${nickname}</h2>
        </center>
        <t:if t:test="!authenticated">
            Please enter your credentials:<br/>
            <t:label for="nickname" 
class="left">${message:label.nickname}</t:label>
            <input t:type="TextField" t:id="nickname" 
t:validate="required,regexp,minlength=3"
                   size="20"  t:mixins="zoneUpdater" t:clientEvent="keyup" 
t:event="nicknameChanged" t:context="nickname" t:zone="detailsZone"/>
            <br/>
            <t:label for="password" 
class="left">${message:label.password}</t:label>
            <input t:type="PasswordField" t:id="password" t:validate="required"
                   size="20" t:mixins="zoneUpdater" t:clientEvent="keyup" 
t:event="passwordChanged" t:zone="detailsZone"/>
            <br/>
            ${message:text.registerinfo}
        </t:if>

        <t:zone t:id="detailsZone" id="detailsZone">
            <t:if test="!pending">
                <t:label for="proposal" 
class="left">${message:label.proposal}</t:label>
                <input t:type="TextArea" t:id="proposal" maxlength="2000" 
t:validate="required,minlength=100"
                    rows="5" cols="52" t:mixins="jquery/tooltip" 
title="${message:hint.proposal}"/>
                <br/>

                <t:label for="startDate" 
class="left">${message:label.appointmentdate}</t:label>
                   <tx:DateField t:id="startDate" format="message:gendatefmt"
                            t:mixins="jquery/tooltip" 
title="${message:hint.appointmentdate}"
                            
onchange="$J(this).closest('registerForm').submit();" />
                <br/>

                <t:label for="startDate1" 
class="left">${message:label.appointmentdate}</t:label>
                   <tx:DateField t:id="startDate1" format="message:gendatefmt" 
t:value="startDate"
                            t:mixins="jquery/tooltip,jquery/bind" 
title="${message:hint.appointmentdate}"
                            bind.eventType="change" bind.event="dateChanged" 
bind.zone="detailsZone" />
                <br/>
  ----- Original Message ----- 
  From: Boris Horvat 
  To: Tapestry users 
  Sent: Saturday, July 13, 2013 12:24 PM
  Subject: Re: zoneUpdate on datefield


  It could be that one of them works only for jquery events. Anyway you can
  do the same as me. User either bind mixin or normal form and zone


  On Sat, Jul 13, 2013 at 1:08 PM, John <[email protected]> wrote:

  > ok, I see the jscalendar does fire onchange as your code below works, but
  > the t:clientEvent="change" for the zoneUpdater doesn't capture the event -
  > I find that a bit confusing?
  >   ----- Original Message -----
  >   From: John
  >   To: Tapestry users
  >   Sent: Saturday, July 13, 2013 11:54 AM
  >   Subject: Re: zoneUpdate on datefield
  >
  >
  >   I think I need to modify the actual datepicker components js to trigger
  > the onchange event as well.
  >     ----- Original Message -----
  >     From: Boris Horvat
  >     To: Tapestry users
  >     Sent: Saturday, July 13, 2013 11:29 AM
  >     Subject: Re: zoneUpdate on datefield
  >
  >
  >     This is what I use
  >
  >          <t:datefield t:id="datefield" t:mixins="jquery/customdatepicker"
  >     t:value="dateValue" onchange="$(this).closest('form').submit();"/>
  >
  >
  >
  >     On Sat, Jul 13, 2013 at 12:29 PM, John <[email protected]> wrote:
  >
  >     > thanks, I'll look into your suggestions I am using jquery
  >     >
  >     > the onchange event only seems to trigger when the input receives
  > focus, is
  >     > keyed and then loses focus (the date picker popup does none of
  > these, maybe
  >     > it should!?)
  >     >
  >     > John
  >     >   ----- Original Message -----
  >     >   From: Boris Horvat
  >     >   To: Tapestry users
  >     >   Sent: Saturday, July 13, 2013 11:18 AM
  >     >   Subject: Re: zoneUpdate on datefield
  >     >
  >     >
  >     >   You dont have to use zoneUpdater, just use normal form and submit
  > it
  >     > when a
  >     >   user changes a value. or you can use bind mixin (assuming that you
  > are
  >     >   using tapestry5-jquery)
  >     >
  >     >
  >     >   On Sat, Jul 13, 2013 at 11:51 AM, John <[email protected]> wrote:
  >     >
  >     >   > I tried that first, it does nothing - not what I expected?
  >     >   >   ----- Original Message -----
  >     >   >   From: Boris Horvat
  >     >   >   To: Tapestry users
  >     >   >   Sent: Saturday, July 13, 2013 10:43 AM
  >     >   >   Subject: Re: zoneUpdate on datefield
  >     >   >
  >     >   >
  >     >   >   try using onchange event
  >     >   >
  >     >   >
  >     >   >   On Sat, Jul 13, 2013 at 11:44 AM, John <[email protected]>
  > wrote:
  >     >   >
  >     >   >   > I am trying to catch changes to a datefield using the
  > zoneUpdater
  >     >   > mixin.
  >     >   >   >
  >     >   >   > The keyup event is fine for typing, but is there a way to
  > capture
  >     > the
  >     >   >   > value change when it's done using the date pickup popup?
  >     >   >   >
  >     >   >   > John
  >     >   >
  >     >   >
  >     >   >
  >     >   >
  >     >   >   --
  >     >   >   Sincerely
  >     >   >   *Boris Horvat*
  >     >   >
  >     >
  >     >
  >     >
  >     >   --
  >     >   Sincerely
  >     >   *Boris Horvat*
  >     >
  >
  >
  >
  >     --
  >     Sincerely
  >     *Boris Horvat*
  >



  -- 
  Sincerely
  *Boris Horvat*

Reply via email to