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 !

Reply via email to