-
Nov 2nd, 2019, 06:47 PM
#1
Thread Starter
Hyperactive Member
Datepicker issue
Hello experts
I'm hoping to do something with datepicker and I don't know if this is possible.
I'm seizing date of birh manually in custom format datepicker. I want if possible when I seize the two first digits of the date, the two digits of the month are selected automatically, then when I seize the month, the four digits of the year are also selected or get focus automatically.
thank you for any idea
-
Nov 2nd, 2019, 08:38 PM
#2
Re: Datepicker issue
not quite sure what you are after, but you can use the day, month and year functions to return each individual 'part of a date from a datepicker.
i.e....
Code:
Debug.Print Day(DTPicker1.Value)
Debug.Print Month(DTPicker1.Value)
Debug.Print Year(DTPicker1.Value)
-
Nov 3rd, 2019, 07:05 AM
#3
Thread Starter
Hyperactive Member
Re: Datepicker issue
thank you sir but it seems you din't understand my worry.

Imagine someone was born in 10/08/2010
After seizing 10, I want 11 to be selected automatically and ready to accept the new value without need to use the mouse and put the curser on 11 to seize 08.
-
Nov 3rd, 2019, 11:23 AM
#4
Re: Datepicker issue
The user can press Ctrl-Tab to move forward through the subfields, Shift-Ctrl-Tab to move backward. There is no method exposed to perform that action, and not really any event you might use besides the Change event.
Rather than try to invent weird behaviors, teach users how a DatePicker works. Then they can use them everywhere.
Tab moves between controls. When a DTPicker has focus, the up/down arrows can change subfield values and Ctrl-Tab/Shift-Ctrl-Tab moves among subfields. Tab again to move to the next field.
-
Nov 3rd, 2019, 11:31 AM
#5
Re: Datepicker issue
I think you are not clear, please use Google translator and write the message in your language. It works quite well.
Also, you post an image with 10/11/2019 and talk about 10/08/2010.
What do you mean by "seizing"?
-
Nov 3rd, 2019, 12:56 PM
#6
Thread Starter
Hyperactive Member
Re: Datepicker issue
 Originally Posted by dilettante
The user can press Ctrl-Tab to move forward through the subfields, Shift-Ctrl-Tab to move backward. There is no method exposed to perform that action, and not really any event you might use besides the Change event.
Rather than try to invent weird behaviors, teach users how a DatePicker works. Then they can use them everywhere.
Tab moves between controls. When a DTPicker has focus, the up/down arrows can change subfield values and Ctrl-Tab/Shift-Ctrl-Tab moves among subfields. Tab again to move to the next field.
Thanks a lot
very clear
-
Nov 3rd, 2019, 01:00 PM
#7
Thread Starter
Hyperactive Member
Re: Datepicker issue
 Originally Posted by Eduardo-
I think you are not clear, please use Google translator and write the message in your language. It works quite well.
Also, you post an image with 10/11/2019 and talk about 10/08/2010.
What do you mean by "seizing"?
"seizing " In french want to say "saisir" I mean writing
anyway thank you
dilettante gave me what I need
-
Nov 3rd, 2019, 01:38 PM
#8
Re: Datepicker issue
 Originally Posted by dilettante
The user can press Ctrl-Tab to move forward through the subfields, Shift-Ctrl-Tab to move backward. There is no method exposed to perform that action, and not really any event you might use besides the Change event.
Rather than try to invent weird behaviors, teach users how a DatePicker works. Then they can use them everywhere.
Tab moves between controls. When a DTPicker has focus, the up/down arrows can change subfield values and Ctrl-Tab/Shift-Ctrl-Tab moves among subfields. Tab again to move to the next field.
With the "official" DTPicker that comes with "Windows Common Controls 2 6.0 (SP6)" you can move between fields with the right and left arrows.
I know there are problems with custom implemented versions of the control and they don't handle these keys.
It can be done but requires some extra code that is rather complex. Krool did it in his version.
-
Nov 3rd, 2019, 01:45 PM
#9
Re: Datepicker issue
So there are already plenty of navigation options.
One problem with automatically moving is knowing when to move.
-
Nov 5th, 2019, 05:30 AM
#10
Re: Datepicker issue
sounds like a credit card expiry date selector with 3 listbox type controls, onclick move to next
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|