I need to limit what Dates
a user can pick from the com.google.gwt.user.datepicker.client.DateBox
.
I can't seem to figure out how to limit the min Date
so they can't pick past dates.
If I can't do this with com.google.gwt.user.datepicker.client.DateBox
is there an alternative DateBox
widget that will allow me this kind of flexibility?
Based on the suggestions I received, here is what I came up with that works on limiting the selectable dates to only the current day and after. This works on GWT 2.1.1
And for completeness here are the
static
helper methods for manipulating the dates:I am guessing here but you may need to use the addValueChangeHandler. An example:
Here when a user somehow selects a date that is in the past, it will auto set it to current date (or whatever fits your needs).