Unlike TextFields vaadin 7 DateFields do not have a TextChangeListener.
A ValueChangelistener only triggers when the field loses focus and for my use case I need it to trigger sooner. (before the field loses focus)
I’ve tried using a shortcutlistener on the component itself but nothing seems to get triggered. I’ve tried the same (and using an actionhandler) on a panel in which I had wrapped the component to trigger the ValueChangeListener when a key is pressed. Unfortunately these do nothing at all when I press a key in the DateField.
Here’s a simple example where I tried it for pressing the NUM1 key:
dfDisabilityBenefitsEndDate = new PopupDateField();
pnlDisBen = new Panel(dfDisabilityBenefitsEndDate);
pnlDisBen.addShortcutListener(new ShortcutListener("TEST", NUM1, null) {
@Override
public void handleAction(Object sender, Object target) {
dfDisabilityBenefitsEndDate.valueChange(null);
}
});
Does anybody have an idea?