hi
1 ideea: make a class that extends DatePicker so that you'll call the
second constructor
protected DatePicker(MonthSelector monthSelector, CalendarView view,
CalendarModel model)
for the params use new DefaultMonthSelector(), new CalendarModel() and
instead of the , new DefaultCalendarView(),
use a class made by the source code of that with the following changes
in the inner class CellGrid (line 37)
you'll have to override the isEnabled() method so that it make the
check if the date is < lastDisabledDate
lastDisabled could be a property in the "MyDefaultCalendarView" and
also could/should be set by an method from the "MyDatePicker"
also you could add a ShowRangeHandlers<Date> that on onShowRange() ...
would iterate days between the start an end and do
datepicker.setTransientEnabledOnDates(false,date) on each iteration
or you could put the in a list and make the only once
datepicker.setTransientEnabledOnDates(false,dateList) (this will call
the first method so it'll be the same thing)
this second method it's a lot more time/resource consuming pick your
choice.
... hope this will help
Good luck
On Jan 4, 3:52 pm, Dariusz <[email protected]> wrote:
> Hi!
>
> Is there a function how to prevent people selecting a date, which is
> in the past? Something like, setMinDate( Date date)?
>
> Thanks
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.