Masks, DBEdit, dates and NULL values


We are trying to use masks with DBEdit components linked to date fields.
We would like the user to be able to enter dates without having to enter
the separators.

If we save the mask with the data (put a 1 as the second field of the
mask), the user cannot enter an empty date (NULL) because the default
validation refuses '    /  /  '.

If we do not save the mask with the data (put a 0 as the second field
of the mask), the tdatefield validation refuses the dates (because, of
course, the separatore are not there).

The solutions we see are:
1. avoid masks altogether (not user-friendly)
2. write a DBEdit descendant which would have sensible validation
routines to use with masks (lots of work)
3. bypass the default TDateField validation routines (not very

I cannot believe that we are the first to experience this problem.

Anybody out there solved it?  Did we miss something?


Robert Gagnon | "Marketing:  The Art of Using the Truth to fool the  
              | consumers."
LONAS Informatique, 3395 Picard, St-Hyacinthe (QC) J2S 1H3 Fax:
(514)774-5160   |   Opinions expressed are my own   |    Tel: