DatetimePicker

Using Datetimepicker User can select Date 20060705 (yyyymmdd) from calender but in case if user wants to enter manully like 20060705 (numeric format) in datetimepicker (no back slash or hit any key) focus always remain to 2006(yyyy) and to pass the focus to 07(mm) user meeds to press extra key then it goes to 07(mm) and again user needs to press extra key to go to 05(dd)
- By default if they try to do that they can not enter full date as 20060705 in datetimepicker.
Is there any way user can enter numeric date without hitting extra key


Answer this question

DatetimePicker

  • ABS123

    Try this:
    Private Sub DateTimePicker1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DateTimePicker1.TextChanged
    SendKeys.Send("{Right}")
    End Sub



  • Thomas2054

    Thank you very much. I really appreciate your help.

    Regards,

    Gav


  • AnubhavG

    I can't edit the post, the forum software is on the fritz again. Change it to:
    If DateTimePicker1.Focused Then SendKeys.Send("{Right}")



  • DatetimePicker