Date picker

forum.wishlist (2000-2005) & forum.gupta.wishlist (2005-2010)
NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Date picker

Post by NewsgroupServer » 23 Apr 2008, 15:25

 Posted by:  Uwe van der Horst 

Hi all,

our customers want to set the date without using the mouse or arrow keys. It
would be very nice to have an input mask that allows the input

010108

for 01-JAN-2008.

Regards,
Uwe

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Date picker

Post by NewsgroupServer » 23 Apr 2008, 18:46

 Posted by:  Jeff Luther 

Well, I just tried this with TD v4.2, and see that I can enter in '01-01-08'
into a date datafield formatted like: dd-MMM-yyyy
and I get back: 01-Jan-2008

And if you want all caps. like "JAN", I see you can get there with:
Data Field: dfD
Data Type: Date/Time
Format: dd-MMM-yyyy
Message Actions
On SAM_Validate
If SalIsValidDateTime( hWndItem )
! be sure to POST, not SEND; then the msg. will not be
transmitted until after the Return below
Call SalPostMsg( hWndItem, SAM_User, 0, 0 )
Return VALIDATE_Ok
! I used SAM_User for this test; you would want to declare
your own PM msg. for this
On SAM_User
Call SalGetWindowText( hWndItem, sUpper, 100 )
Call SalSetWindowText( hWndItem, SalStrUpperX( sUpper ) )

Variables
String: sUpper

Anyway, that's how to get what you want. Since "010108" is a number, not a
valid date/time (01-01-08 is valid), it's a bit much to ask TD to know to
translate that for you, but with a little coding you get (nearly) what your
users want. They still do have to key in the 2 "-" characters to make it
valid, though.

Best Regards,
Jeff @ PC Design
info. & samples: www.JeffLuther.net/unify/

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Date picker

Post by NewsgroupServer » 25 Apr 2008, 15:06

 Posted by:  Mirko BONANNO 

Actually, I think, he is speaking about the new, fantastik, fancy, brand new
(but apparently not so famus...yet) object in V5.1 !

The so called : Date/Time piker

http://www.unify.com/Products/TeamDeveloper/TeamDeveloper_5.1_WhatsNew.aspx

Mirko

Return to “gupta.wishlist”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests