Wicket DateTextFieldConfig not working as expected

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Wicket DateTextFieldConfig not working as expected

Tushar C
DateTextFieldConfig currentDateAhead= new DateTextFieldConfig();
DateTime currentDate = new DateTime();
DateTime plusOneAhead = currentDate.plusDays(1);
currentDateAhead.withStartDate(plusOneAhead);

DateTextField startDateTextField = new DateTextField("StartDate", new PropertyModel<Date>(myModel, "startDate"), currentDateAhead);


In the control I expect dates from tomorrow enabled and all dates including today's date and past date disable, so that I can select only future dates. But it's not working like this, I get dates in the past disable but I can still select today's date in the control. Can anyone please share their view and guide me where I am going wrong.