No, I just tried it without the date picker and it does the same thing.
So it seems to be tied up in the sending the date as text and getting it
via RequiredTextField eventDate = new RequiredTextField("eventDate",
Date.class)?

I'm pretty sure I had this working before, but may have just not noticed
the problem. For what it's worth I'm still using b4, the form in
question is in a Panel, and my testing browser is currently Epiphany
(gecko based, gnome). I'll see if I can try it again with Firefox.

Troy


On Thu, 2005-29-09 at 06:19 +0200, Eelco Hillenius wrote:
> Typing in input directly works (it should)? Must be related to the
> javascript datepicker component.
> 
> Eelco
> 
> 
> On 9/29/05, Troy MacNeil <[EMAIL PROTECTED]> wrote:
> > I'm having a small but frustrating problem saving dates from a form. I
> > enter them in the format m/d/yyyy (this is the format returned by the
> > TypeValidator ${format}) using a DatePicker component but when the model
> > is saved the day and year are correct but the month is always '01'.
> >
> > Setting the date to today in onSubmit() works correctly, so it isn't a
> > persistence problem but a parsing problem?
> >
> > Code snippets are below, thanks for any suggestions...
> >
> > Troy
> >
> > Original code:
> >
> > RequiredTextField eventDate = new RequiredTextField("eventDate",
> > Date.class);
> > add(eventDate);
> > add(new DatePicker("eventDatePicker", eventDate));
> >
> > public void onSubmit() {
> > SimpleEvent event = (SimpleEvent)getModelObject();
> > ((VSecureRequestCycle)getRequestCycle()).getDao().merge(getModelObject());
> > setResponsePage(new Schedule("The event has been added."));
> > }
> >
> > Setting the Date directly works:
> >
> > public void onSubmit() {
> > SimpleEvent event = (SimpleEvent)getModelObject();
> > event.setEventDate(new Date());
> > ((VSecureRequestCycle)getRequestCycle()).getDao().merge(event);
> > setResponsePage(new Schedule("The event has been added."));
> > }
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by:
> > Power Architecture Resource Center: Free content, downloads, discussions,
> > and more. http://solutions.newsforge.com/ibmarch.tmpl
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to