Subject Re: TIB_Date questions
Author Marco Menardi
--- In, "scronkey" <nilsson@b...> wrote:
> Hi there,
> I have two questions:
> A) When the focus is in an IB_Date component, and the space is
> pressed, todays date comes up, but when I step off the component I
> get an error "07/Mar/2003" is an invalid date. I obviously have my
> Control Panel date settings to dd/mmm/yyyy, so I can understand
> this, but when I drop down the component and select some date, say
> 01/May/2002, and step off the component, no error occurs. Yet this
> clearly has the mmm part as well.
> This seems like an incopsistency to me, which doesn't make sense.
> I would really like the space=now option, and also keep my
> dd/mmm/yyyy format.
> Any ideas?

I've no time to investigate right now, so I can give you some
suggestions/tips. If they don't solve the problem, post it and I will
have a look at weekend.
a) it's a data bound control, so what is entered must be compatible
with StrToDate delphi function. I suppose "07/Mar/2003" is not, so at
runtime, when you step out the component, the field assignmet fails
b) as Helen tells you in another reply, you can tell IBO to use
display and edit mask format at domain level
so, in conclusion, you MUST have an editing format compatible with
StrToDate, so choose something like dd/mm/yyyy.
For display purpouse, you can choose whatever you want, so dd/mmm/yyyy
should be good
Me, for instance, have two kinds of date domain at database level just
to have two "families" of data display format in IBO!
the editing mask of both is (FieldsEditMask):

hope this will solve your problems
Another tip: there is a property that I'm sure you will like:
When true, as you starty typing it fills the control with the current
day, and since your date format is dd/mm/yyyy, you have the most value
from it. If you have to type tomorrow, just typing '07' will produce
Marco Menardi