Apologies, spoke too soon - my Behaviour idea is also a non-starter.  They
have predictable wicket:ids, but no DOM ids at all, so I cannot locate the
fields via JavaScript.

I'm guessing at this point that I should just copy the DateTimeField
component entirely and modify to fit! :-)

Charlie.



On Wed, Mar 26, 2008 at 1:57 PM, Charlie Dobbie <[EMAIL PROTECTED]> wrote:

> Hi all,
>
> Date handling in my application is rather shoddy at the moment, and I'm
> trying to clean it up and make things work properly.  I've added
> wicket-datetime-1.3-SNAPSHOT and want to use the DateTimeField, but there
> are a couple of extra things I need that are stumping me at the moment.
>
> Firstly, I need to make the time fields mandatory, if and only if a date
> has been specified.  (Unless forced, my users leave fields blank, making
> every date midnight of the specified day...)  The hours and minutes fields
> are private, so I cannot access them to add any custom validation - is there
> any other way around this?
>
> Secondly, I need to provide a JavaScript link near the component which
> will automatically fill everything to the current date and time.  I think I
> can provide this via a Behaviour as the input components have predictable
> DOM ids, but how can I get at the date format that the component is
> expecting?  Or is this the wrong approach, and I should be doing something
> in Java via Ajax instead?
>
>
> Thanks for any thoughts on these,
> Charlie.
>
>

Reply via email to