I have a TDBEdit connected to a DateTime field in a dataset. Now, if I type "10" into the TDBEdit, that means that I am referring to the 10th day in the current month and current year. So I want "10" to be converted into "2000-01-10", which is a valid date.
But before I get a chance to convert the contents I get an exception saying "'10' is not a valid date and time!".
The ideal thing would be to do the conversion in the onExit event of the TDBEdit, but the exception above is raised before I get there!
I've solved it before by putting an ordinary TEdit control on top of the TDBEdit and switch between them, but I really would like a simpler way!