dcsimg
Results 1 to 10 of 10

Thread: Datepicker issue

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2015
    Posts
    465

    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

  2. #2
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    7,238

    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)

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2015
    Posts
    465

    Re: Datepicker issue

    thank you sir but it seems you din't understand my worry.

    Name:  03-11-2019 12-52-54.png
Views: 75
Size:  1.1 KB

    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.

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,720

    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.

  5. #5
    Frenzied Member
    Join Date
    Feb 2017
    Posts
    1,932

    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"?

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2015
    Posts
    465

    Re: Datepicker issue

    Quote Originally Posted by dilettante View Post
    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

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2015
    Posts
    465

    Re: Datepicker issue

    Quote Originally Posted by Eduardo- View Post
    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

  8. #8
    Frenzied Member
    Join Date
    Feb 2017
    Posts
    1,932

    Re: Datepicker issue

    Quote Originally Posted by dilettante View Post
    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.

  9. #9
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,720

    Re: Datepicker issue

    So there are already plenty of navigation options.

    One problem with automatically moving is knowing when to move.

  10. #10
    Registered User
    Join Date
    Dec 2004
    Posts
    24,634

    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
  •  



Featured


Click Here to Expand Forum to Full Width