Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Loose StrictDateEntry
Message
 
 
To
31/01/2005 12:29:12
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
00981831
Message ID:
00982327
Views:
80
>>If it knows best, why I can type anything if the Format is not set? It should not allow me to type "mama" there.
>
>Because it does not know yet it is a datetime.
>
>There are two ways for it to know it is a datetime. (1) Bind it to a datetime field and (2) set its value to any datetime value.
>
>Just did the test
>
>&& NO format
>&& no inputmask
>&& no value
>&& no Controlsource
> >> Mama && ok
>
>&& a value { / / :} or a ControlSource
>
>>> Mama && the bell rings, but I do not see her appear
>
The thing is, that even if I set it to datetime, it still allows me to type anything if StrictDateEntry = 0. Anyway, I found a way to trick it and was able to put my own InputMask. However, it didn't bring me closer to my goal, because as soon as I type a wrong date and tab out of the field, it blanks the date and the valid is too late.

I just now understood, why in Martin's sample he unbind the controlsource in GotFocus and bind it back in LostFocus. But then we have to update the value ourselves...

Too much trouble!
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform