The date is determined by your model - it's getting the date from
YourObject.getStartDate().  Set the date on YourObject and it should
work.

--
Jeremy Thomerson
http://www.wickettraining.com




On Tue, May 12, 2009 at 2:26 PM, Matthieu Labour <matth...@strateer.com> wrote:
> Hi
>
> I am new to Wicket. I did some research on the mailing list but didn't come
> accross a solutioin for the following issue.
>
> I need to set dynamically the Date in a DateTextField
>
> Here
>
> final StyleDateConverter styleDateConverter = new StyleDateConverter("S-",
> true);
> final IModel model = new PropertyModel(getModel(), "startDate");
> final Component component = new DateTextField("startDate", model,
> styleDateConverter);
> final IBehavior datePicker = new DatePicker();
> component.add(datePicker);
>
> DateTime now = new DateTime();
> DateTime startDate = now.minusDays(20);
>
> and now I would like to do the following pseudo code
> (DateTextField)component.setDate(startDate.toDate())
>
> I would appreciate any help
>
> Thank you !
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to