Subject | Re: [IBO] blank edit mask for date fields |
---|---|
Author | mmenaz |
Post date | 2002-02-15T09:18:41Z |
TIB_Edit has not such a problem. IB_native components are FAR BETTER/SUPERIOR/RAD than VCL counterpart! I was facing your problem when I was using VCL+Paradox and a mask 'dd/mm/yy'. I had to create a new TDBEdit component that handles the 'canc' key to set the field to NULL (if NULL, the mask is not elaborated).
Unfortunatly, I can't find the code now :( It was something in the keypress (or keydown?), that checked for VK_CANC (or VK_DEL?), checked the mask and text value to guess if you are cancelling the all field or just a digit, and in the former case "clear" the database field.
Hope this will help you a little.
It's a blame that VCL is so poor in IMPORTANT things like this, not to cite the lack of mask support for monetary values. IB_native with IB_Edit and IB_Currency have all what you need and beyond (I've found valuable their capability of work "unbound" from the database too!)
The sooner you go to IB_native, the more time you save to you (and there are plenty of areas where this is true, belive me!)
regards
Marco Menardi
Unfortunatly, I can't find the code now :( It was something in the keypress (or keydown?), that checked for VK_CANC (or VK_DEL?), checked the mask and text value to guess if you are cancelling the all field or just a digit, and in the former case "clear" the database field.
Hope this will help you a little.
It's a blame that VCL is so poor in IMPORTANT things like this, not to cite the lack of mask support for monetary values. IB_native with IB_Edit and IB_Currency have all what you need and beyond (I've found valuable their capability of work "unbound" from the database too!)
The sooner you go to IB_native, the more time you save to you (and there are plenty of areas where this is true, belive me!)
regards
Marco Menardi
--- In IBObjects@y..., "paulfilmer" <pfilmer@b...> wrote:
> > I am guessing that you are using a dialect 3 database, with a
> > fieldtype of DATE. If you were using a field type of TIMESTAMP I dont
> > think you would see this problem.
>
> Well guessed!
>
>
> > A work around for this may be to define an explicit mask of
> > 'ccccccccccccccccc' (or similar).
>
> That's what I was thinking. In our components we've already written
> some date handling routines so I think I can at least get it into a
> "workable" state.
>
> We will be going to TIB_Edit probably later this year.
>
> Thanks,
>
> Paul.