Need to enter lots of dates in my application.
I've been looking for wx??? control which allows me to enter dates
from keyboard in easy way. Yes, i know of wxCalendar + wxPopupControl ,
it's great for the mouse, but i've need in addition easy keyboard
input and validation if possible.
Searhing archives show me wxMaskedEdit. Where can i get a copy?
I've been looking for wx??? control which allows me to enter dates
from keyboard in easy way.
You might want to look at wxDateTime class because it has the ability to
parse text strings into dates with a lot of flexibility. For example,
"5/12/3", "May 12, 2003", "tomorrow", "next week", etc. Pretty cool.
-Rick King
I've been looking for wx??? control which allows me to enter dates
from keyboard in easy way.
You might want to look at wxDateTime class because it has the ability to
parse text strings into dates with a lot of flexibility. For example,
"5/12/3", "May 12, 2003", "tomorrow", "next week", etc. Pretty cool.
-Rick King
But i need not only parsing, but also assist lazy user ( they all lazy )
to enter date 05/12/2003 like 05122003.
Anyway, i've asked ezmlm to send me a copy of message with
maskededit.py and got it.
Thanks for hint, Rick.
You are so helpful.
It's nice to have such a helpful community!
mailto:igor@tyumbit.ru
Be careful to test the strings *your* application expects. I found
several cases that mx didn't handle, which I thought were surprising.
And the real killer is that when it can't figure out the input, it
returns the current date! IMO only an exception or None makes sense in
that case: When the user types in "Sepp 30, 2001" they should get a
beep, not "May 12, 2003"!
So I wrote a wrapper to handle those specific cases and then pass the
rest to DateTimeFrom(). Consider it an ugly bandaid. Attached.
> I've been looking for wx??? control which allows me to enter dates
> from keyboard in easy way.
You might want to look at wxDateTime class because it has the ability
to parse text strings into dates with a lot of flexibility. For
example, "5/12/3", "May 12, 2003", "tomorrow", "next week", etc.
Pretty cool. -Rick King
Need to enter lots of dates in my application.
I've been looking for wx??? control which allows me to enter dates
from keyboard in easy way. Yes, i know of wxCalendar + wxPopupControl ,
it's great for the mouse, but i've need in addition easy keyboard
input and validation if possible.
Searhing archives show me wxMaskedEdit. Where can i get a copy?
You can get the latest version from CVS, and it will be in the next release.