Thanks for this wonderfull code!My pleasure! I hope that it works for you.
Is anything like this is KiloFox (which I have at home)?There are some calendar controls as well as a date textbox class (See chapter 4), but nothing to get rid of the time portion of a DateTime value.
If you did not have to update the values, you could simply set the textbox's ControlSource to something like this:
( TTOD( MyAlias.MyDateTimeField ) )
The problem with this is that it makes the control ReadOnly. The only way you can edit the field and still display only the date portion is to use the methodology I have outlined - unbind it behind the scenes and handle the updates manually.