Easy way to enter date ( or where can i get wxMaskedEdit ) ?

Hi, community!

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?

Thanks in advance.
Igor.
                     mailto:igor@tyumbit.ru

···

---

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. :slight_smile:
Thanks for hint, Rick.
You are so helpful.
It's nice to have such a helpful community! :slight_smile:
                         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.

ParseDateTime.py (2.31 KB)

···

On Monday 12 May 2003 05:28 am, Rick King wrote:

> 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

--
Chuck
http://ChuckEsterbrook.com

Igor Prischepoff wrote:

Hi, community!

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.

http://cvs.wxwindows.org/viewcvs.cgi/wxPython/wxPython/lib/Attic/maskededit.py?rev=1.1.2.3&only_with_tag=WX_2_4_BRANCH&hideattic=0&content-type=text/vnd.viewcvs-markup

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!