}
};
monitorEvents.add(toggleHandler("Log hover events", picker, logHovers));
// Log select events.
ChangeHandler logSelects = new ChangeHandler<Date>() {
public void onChange(ChangeEvent<Date> event) {
Log.info("Select:" + event.getOldValue() + "-->" + event.getNewValue());
}
};
monitorEvents.add(toggleHandler("Log select events", picker, logSelects));
// Disable selected date
ChangeHandler toggleEnabled = new ChangeHandler<Date>() {
public void onChange(ChangeEvent<Date> event) {
Date d = event.getNewValue();
picker.setVisibleDateEnabled(d, !picker.isDateEnabled(d));
}
};