I'm trying to create a DateInputFieldModel (subclass of ComposableModel).
It uses a TextInputFieldModel as inputField
.
I set inputField autoAccept: true.
.
I don't want to use return/enter to accept.
While typing, I'm checking with acceptBlock whether the input text is interpretable as a date.
In my case, for instance one digit is already interpretable as a date.
When you type 5, this would mean the 5th of the current month of the current year.
When the input field loses focus (tab or mouse), I'd like to render the final representation of the date into the inputField
, and update the date value of my DateInputFieldModel.
Any pointers on how to achieve this?
The underlying Morph gets send
#keyboardFocusChange:
You probably need to add #whenFocusChanged: somewhere in the ComposableModel hierarchy and make sure it is called from the correct AbstractMorphicAdapter subclasses