Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Here we go w/the invalid date value again
Message
 
To
13/03/2002 06:24:35
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00631821
Message ID:
00631998
Views:
16
>Jon,
>I'd set date format to one of DMY,YMD,MDY asking users. Anyway you could control it in lostfocus of date fields. ie :
>
>if !empty(this.value) and year(this.value)<1601
> messagebox('Wrong date')
> nodefault
>endif
>
Or you might provide your users a calendar control for more flexibility.
>Cetin

Cetin,

Thank you for your response. We actually already provide a calendar, however our application has a LOT of date fields in it - forcing the user to use a calendar on each one would not be practical.

As for setting the date format to non-short/long, I think that is an option that we will only reserve as a last resort. We prefer not to dictate a date format - plus we also prefer having a 4-digit year in the format which the other formats don't support.

We'll give the lostfocus method a try and see what happens. I hope that lostfocus gets fired before the error occurs.

Laterness,
Jon
Jon Rosenbaum
Devcon Drummer
Previous
Reply
Map
View

Click here to load this message in the networking platform